NelmioApiDocBundle
NelmioApiDocBundle copied to clipboard
[Feature]: Describing default error response
Description
Symfony's serializer component comes with it's own ProblemNormalizer which allows exceptions (FlattenException
) to be transformed into different formats.
Users of Symfony can also utilize an error listener/subscriber to customize handling to, for example, transform an exception to a custom response.
It would be great if this bundle allows users to manually specify or automatically generate default swagger responses for each of their routes.
Additional context
Additionally this bundle could utilize the default error controller from the framework config and describe swagger annotations/attributes for this error controller and augment every other response with this controller as a default response.