-
-
Notifications
You must be signed in to change notification settings - Fork 933
Description
This issue merges multiple subresources issues because the root problem is the same.
While talking with core members at EU-FOSSA Hackathon we came to a solution. Best would be to refactor the ApiSubresource
annotation so that it supports the same attributes as does the ApiResource
. For example:
- routing options
- access_control
- normalization context
Thanks to this it'll be easier to declare these and we solve the issue (mentioned in #1617 (comment)). The subresource metadata will not be in ApiResource
anymore but directly inside the ApiSubresource
annotation.
Todo list :
- Fix swagger and don't show the collection on the side that doesn't own the Subresource ([Swagger] Do not tag a sub-resource operation with child resource #1612)
- Fix the serialization context declaration (solves [Subresource] Fixed the serialization context builder #1617 and (de)normalization_context is not used for subresourceOperations #1616 and improves DX for SubResource and security #1649)
- Simplified the code for the documentation (ses Subresource collection filters not added by DocumentationNormalizer #1736)
- Subresource operations may override collection operations which should not happend (see @ApiSubresource route overriding other collection routes with same path api-platform#1022)
consider: #3466 and work on #3689
Maybe that this is a prerequisite for write support on subresources (see #2598 #2428)
ping @torreytsui @vincentchalamon please lmk if I forgot things
@lyrixx I'm closing related PRs we will definitely take back the work you did if we can, thanks for pushing this issues