Skip to content

Conversation

mladedav
Copy link
Collaborator

@mladedav mladedav commented May 5, 2024

Ref #2651 and #2659

Motivation

Nesting at /foo and /foo/ is almost the same but isn't consistent in whether the root route is at /foo or at /foo/.

More discussion is in #2659

Solution

This is one possible solution which:

  • disallows nesting at routes ending with a slash. So nesting at /foo/ is disallowed.
  • allows overriding where the root route would be accessible with a specialized method. At /foo, /foo/, or both. The default is both to make it consistent with nest_service, but could also be /foo to not change the behavior (the previous point is already breaking change though).

This would need some cleaning up (e.g. fixing all tests that nest at paths ending with slashes). Also, all endpoints are now needlessly cloned during nesting just because we might need to clone the root one so that's one thing I'd like to solve better if we wanted to go in this direction.

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.

1 participant