You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extra context: We're using openapi_first which automatically generates a hanami-router based off the OpenAPI definition. Internally it converts the OpenAPI path names like this: /foo/{bar}/baz -> /foo/:bar/baz and uses those to generate the routes. For now we're going to ensure all our OpenAPI paths use common capture names. We could also look at patching openapi_first to ensure the names match across nested routes.
Thanks :)
The text was updated successfully, but these errors were encountered:
Hey!
I've run into some unexpected (to me) behaviour when finding nested routes with different capture names.
Here's an example that shows the behaviour:
GET
route at/foo/:id
GET
route at/foo/:foo_id/bar
/foo/:foo_id/bar
404sGET
route at/foo/:foo_id
(uncomment the line)/foo/:foo_id/bar
now returns 200Is this behaviour expected?
Extra context: We're using openapi_first which automatically generates a hanami-router based off the OpenAPI definition. Internally it converts the OpenAPI path names like this:
/foo/{bar}/baz
->/foo/:bar/baz
and uses those to generate the routes. For now we're going to ensure all our OpenAPI paths use common capture names. We could also look at patchingopenapi_first
to ensure the names match across nested routes.Thanks :)
The text was updated successfully, but these errors were encountered: