Describe the feature
In the standard example of petStore example https://petstore3.swagger.io/ we have below routes defined
/pet/findByStatus
/pet/{petId}
When using it with generators, it declares the routes in the same order as it is set in the openApi spec => problem appears
if I call GET /pet/findByStatus:
- without
exclusive option in the router: both routes are executed
- with
exclusive option in the router: route /pet/{petId} is executed (last match)
In openApi specifications it is not the order that do the priority but the less parameter route (see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-templating-matching)
I create a "best match' algorithm to support it, that stay compatibel with original solution.
PR to support it is here: #227
Checklist
Describe the feature
In the standard example of petStore example https://petstore3.swagger.io/ we have below routes defined
/pet/findByStatus
/pet/{petId}
When using it with generators, it declares the routes in the same order as it is set in the openApi spec => problem appears
if I call GET /pet/findByStatus:
exclusiveoption in the router: both routes are executedexclusiveoption in the router: route /pet/{petId} is executed (last match)In openApi specifications it is not the order that do the priority but the less parameter route (see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-templating-matching)
I create a "best match' algorithm to support it, that stay compatibel with original solution.
PR to support it is here: #227
Checklist