Skip to content

fix: make sure to strip also base path non pathParameter - #555

Merged
brettstack merged 3 commits into
CodeGenieApp:v5from
fossamagna:fix-377
May 8, 2023
Merged

brettstack merged 3 commits into
CodeGenieApp:v5from
fossamagna:fix-377

Conversation

@fossamagna

Copy link
Copy Markdown
Contributor

Issue #, if available:

fix #377

Description of changes:

When define resource /users/${proxy+}, request to /users/123 is path as /123. But when mapping /users, request to /users is path as /users not /. It is not symmetry.

BREAKING CHANGE: A handler of defined resource not use pathParameter be also less able to get base path.

Checklist

  • Tests have been added and are passing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

fossamagna and others added 2 commits October 7, 2022 22:22
When define resource `/users/${proxy+}`,  request to `/users/123` is path as `/123`. But when
mapping `/users`,  request to `/users` is path as `/users` not `/`.  It is not symmetry.

BREAKING CHANGE: A handler of defined resource not use pathParameter be also less able to get base
path.

fix CodeGenieApp#377
@fossamagna

Copy link
Copy Markdown
Contributor Author

@brettstack @brett-vendia
Could you review this pull request?

@brettstack

Copy link
Copy Markdown
Collaborator

Thanks @fossamagna is this a breaking change?

@fossamagna

Copy link
Copy Markdown
Contributor Author

@brettstack
Thank you for your reply.
I think that breaking change. Since, if a handler of defined resource don't have a custom domain and pathParameter, it is also less able to get base path.

@brettstack
brettstack changed the base branch from mainline to v5 May 8, 2023 05:51
@brettstack
brettstack merged commit e7017d5 into CodeGenieApp:v5 May 8, 2023
github-actions Bot pushed a commit that referenced this pull request Dec 8, 2025
## [4.17.2-beta.1](v4.17.1...v4.17.2-beta.1) (2025-12-08)

### Bug Fixes

* response.write() to return a bool (resolves [#683](#683)) ([#702](#702)) ([d9be538](d9be538))
* support nested routes and custom domains ([#555](#555)) ([422bac1](422bac1))
github-actions Bot pushed a commit that referenced this pull request Dec 8, 2025
# [5.0.0-beta.1](v4.17.1...v5.0.0-beta.1) (2025-12-08)

### Bug Fixes

* response.write() to return a bool (resolves [#683](#683)) ([#702](#702)) ([d9be538](d9be538))
* support nested routes and custom domains ([#555](#555)) ([422bac1](422bac1))

### Features

* v5.0.0 - Node.js 24 support and removal of deprecated APIs ([a6263a3](a6263a3))

### BREAKING CHANGES

* Minimum Node.js version is now 24 (though earlier versions may work)
* Handler no longer accepts callback parameter - async/Promise only
* Removed resolutionMode option (CALLBACK/CONTEXT modes removed)
* Removed binaryMimeTypes option (use binarySettings instead)
* Removed deprecated createServer() and proxy() exports
* Removed deprecated handler.handler() and handler.proxy() methods
github-actions Bot pushed a commit that referenced this pull request Apr 16, 2026
# [5.0.0](v4.17.1...v5.0.0) (2026-04-16)

### Bug Fixes

* **event-sources:** prevent static resource path from being stripped without custom domain ([5b2e683](5b2e683))
* response.write() to return a bool (resolves [#683](#683)) ([#702](#702)) ([d9be538](d9be538))
* support nested routes and custom domains ([#555](#555)) ([422bac1](422bac1))

### Features

* v5.0.0 - Node.js 24 support and removal of deprecated APIs ([a6263a3](a6263a3))

### BREAKING CHANGES

* Minimum Node.js version is now 24 (though earlier versions may work)
* Handler no longer accepts callback parameter - async/Promise only
* Removed resolutionMode option (CALLBACK/CONTEXT modes removed)
* Removed binaryMimeTypes option (use binarySettings instead)
* Removed deprecated createServer() and proxy() exports
* Removed deprecated handler.handler() and handler.proxy() methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Routing to root path does not work correctly when using nested API resources

2 participants