-
-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Subresource metadata #2706
Comments
Very good move! Can't wait to have it land in APIP 👍 |
Would this RFC also help creating custom subresources as described in #1654? |
I disagree. We could show subresource operations in a separate subsection, maybe? (Not sure if possible with Swagger UI.) |
AFAIR we tried and it’s not. |
To answer my own question: OAI/OpenAPI-Specification#1367 So, nope. |
An alternative is to tag them as e.g. EDIT: Never mind, I think the suggestion in the original issue is better indeed. Just tag it from the root resource it could be accessed from. But perhaps the operation's description could be improved? |
I think tagging on the root resource seems the best option we have so far. My thought is that subresource no matter how deep is it (
Should all levels configure in root (i.e.,
Each of above are different operations and it makes sense to have their own independent configurations. How do we explicitly declare them? How to enable / disable certain operations? At the moment, there are only item GET and collection GET, but when we implement write operations, it will get complicated and escalate as the depth grows. |
|
|
I think this could be closed in favour of #3689 |
|
Subresources have been deprecated in 2.7 and removed in 3.0 |
@vincentchalamon Is this still valid? I see a Subresources section in the latest documentation (v3.1): https://api-platform.com/docs/core/subresources/ |
@gigo6000 the |
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 theApiResource
. For example: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 theApiSubresource
annotation.Todo list :
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
The text was updated successfully, but these errors were encountered: