Usage example for the adrenalinkin/swagger-resolver-bundle.
Example assumes you will use Symfony 4 with NelmioApiDocBundle as Swagger wrap.
Note: Feel free to connect with me by email adrenalinkin@gmail.com or in Telegramm @adrenaL1nkin.
- Install dto-resolver for creating valid DTO from array.
- Register argument resolvers
EntryDtoArgumentResolver.php
andCollectionEntryDtoArgumentResolver.php
(lookservices.yaml
). After that you will be able to pass already resolved DTO as controller argument!
Note: Handlers with business logic has been omitted.
- Add
CreateProfileEntryDto.php
to validate request body. - Add
GetBaseProfileResultDto.php
to validate response body. (IF NEEDED) - Add controller
ProfileController.php
.