-
-
Notifications
You must be signed in to change notification settings - Fork 906
How to change Subresource path #1479
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
Comments
It should work just as you would overwrite the one of a collection operation. For example: # src/AppBundle/Resources/config/api_resources/resources.yml
AppBundle\Entity\Answer:
collectionOperations:
api_questions_answer_get_subresource:
method: 'GET' # nothing more to add if we want to keep the default controller
path: '/foo/{id}/bar' Before you do this check |
When I am naming my collectionOperation to |
Mhh I need to change the docs on this itś s actually only the suffix. Just like you're doing to replace a collection operation (ie For example to replace the collectionOperations:
person_get_subresource:
method: 'GET'
path: '/foo/{id}/bar' |
The problem is that i don't want to change the |
Okaaayy. My bad thought this was fine! |
So, the correct way was your first opinion? # src/AppBundle/Resources/config/api_resources/resources.yml
AppBundle\Entity\Answer:
collectionOperations:
api_questions_answer_get_subresource:
method: 'GET' # nothing more to add if we want to keep the default controller
path: '/foo/{id}/bar' |
|
fix #1479 allow to override SubresourceOperations through metadata
…ride-operation fix api-platform#1479 allow to override SubresourceOperations through metadata
Is it possible to change the path of a subresource?
The text was updated successfully, but these errors were encountered: