Created
September 10, 2020 11:08
-
-
Save botris/07b3565440209dad57b1faa701b70b27 to your computer and use it in GitHub Desktop.
API Platform - handle 2 endpoints on the same entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @ApiResource( | |
* itemOperations={ | |
* "get"={ | |
* "path"="/entity/{id}", | |
* "openapi_context" = { | |
* "parameters" = { | |
* { | |
* "name" = "id", | |
* "in" = "path", | |
* "required" = "true", | |
* } | |
* } | |
* }, | |
* "path"="/entity_alternative/{id}", | |
* "controller"=AlternativeController::class, | |
* "openapi_context" = { | |
* "parameters" = { | |
* { | |
* "name" = "id", | |
* "in" = "path", | |
* "required" = "true", | |
* } | |
* } | |
* } | |
* } | |
* } | |
* ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment