This repository contains a sample setup for REST APIs implemented with the Symfony framework. It uses the NelmioApiDocBundle to generate an API documentation in the OpenAPI format, uses this information to validate incoming data with the help of the SwaggerResolverBundle and shows how the Symfony serializer can be used to avoid manual data transformations.
Feel free to take a look at the ContactController - it is the centrepiece of this setup.