core icon indicating copy to clipboard operation
core copied to clipboard

SubresourceOperations customisation DX enhancement

Open PierreThibaudeau opened this issue 5 years ago • 3 comments

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

PierreThibaudeau avatar Mar 27 '20 16:03 PierreThibaudeau

TODO:

  • [ ] deprecate old operation names for now (they should still work)
  • [ ] add behat test for serialization groups
  • [ ] ask @bendavies to try this :smile:

soyuka avatar Apr 01 '20 07:04 soyuka

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?

GregoireHebert avatar Apr 04 '20 17:04 GregoireHebert

Is this PR still relevant, considering subresources are deprecated on 2.7 and removed on 3.0? @soyuka @PierreThibaudeau

vincentchalamon avatar Jul 20 '22 10:07 vincentchalamon

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.

stale[bot] avatar Nov 04 '22 21:11 stale[bot]

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.

stale[bot] avatar Jan 03 '23 21:01 stale[bot]