core
core copied to clipboard
SubresourceOperations customisation DX enhancement
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tickets | fixes #3458 |
| License | MIT |
| Doc PR | api-platform/docs#1084 |
Changes the way to define serialization groups for subresources. Changes the nomenclature to override subresource operations.
Example:
| OLD | NEW |
|---|---|
| api_questions_answers_get_subresource | answers_get |
| api_questions_answers_question_get_subresource | answers_question_get |
TODO:
- [ ] deprecate old operation names for now (they should still work)
- [ ] add behat test for serialization groups
- [ ] ask @bendavies to try this :smile:
IMO, in the Question-Answer relation, the Answer side sub-resource route should still be prefixed by the associated "parent" resource. I did not run any test, but AFAIK if you have multiple "parents" resources having the same "child" resource as sub-resource, can't you end-up with a conflict?
Is this PR still relevant, considering subresources are deprecated on 2.7 and removed on 3.0? @soyuka @PierreThibaudeau
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.