@ApiSubresource route overriding other collection routes with same path
See original GitHub issueI’ve noticed that if you add a collectionOperations that uses the same path as an existing @ApiSubresource, then the route operation is missing from the generated Swagger docs.
I’ve found the workaround is to re-name the {id} parameter to something else, that does not clash with the @ApiSubresource path, but this took some working out. It looks like the \ApiPlatform\Core\Swagger\Serializer\DocumentationNormalizer::normalize() method does not combine the routes together, but instead allows the @ApiSubresource version to overwrite the other routes.
I think that \ApiPlatform\Core\Swagger\Serializer\DocumentationNormalizer::normalize() (or it’s dependencies) could do with updating to combine not overwrite the route docs.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to expose different GET routes for the same entity
For the moment, I have one GET route for an item : /api/users/{id} I would like to have 3 GET routes for an...
Read more >Working with routes for HTTP APIs - Amazon API Gateway
Routes direct incoming API requests to backend resources. Routes consist of two parts: an HTTP method and a resource path—for example, GET /pets...
Read more >Rails Routing from the Outside In - Ruby on Rails Guides
How to automatically create paths and URLs using route helpers. ... the Singular Form; Using :as in Nested Resources; Overriding Named Route Parameters....
Read more >Attribute Routing in ASP.NET Web API 2 | Microsoft Learn
This topic discusses how to enable attribute routing in ASP. ... That way, you can combine both types of routing in the same...
Read more >Routing — Falcon 3.1.1 documentation
a collection of those same items. Another class might use a suffixed responder to handle a shortlink route in addition to the regular...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Should be moved to the
api-platform/corerepositoryThank you @soyuka