Open
Description
Description
In OpenApiFactory
, the schema is not generated for the validation error (422):
core/src/OpenApi/Factory/OpenApiFactory.php
Line 227 in e649fa1
It would be nice to add it at least for Hydra.
Hydra normalizes the validation error like this:
core/src/Core/Hydra/Serializer/ConstraintViolationListNormalizer.php
Lines 46 to 50 in e649fa1
One way to implement it would be to add a new schema type, like TYPE_VALIDATION_ERROR
here:
core/src/Core/JsonSchema/Schema.php
Lines 30 to 31 in e649fa1
And handle this new type in this method: