Last active
November 25, 2020 15:50
-
-
Save merltron-pa/bf2937b326ad3c3a2a62a2ebb48f69c7 to your computer and use it in GitHub Desktop.
PHP/JMS Article: Added JUST the body converter
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 | |
... | |
class TestAddressController extends AbstractFOSRestController | |
{ | |
/** | |
* @Route("/test/address", methods={"POST"}) | |
* @ParamConverter("address", converter="fos_rest.request_body") | |
*/ | |
public function post(Address $address): Response | |
{ | |
return new Response($this->serializer->serialize($a, 'xml')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment