07-15-2021 02:02 AM
custom error message for component validation
Im using OpenAPI 3.0.1, and use components that have type/value validations. (i.e. type/enum/range).
When I access the relevant paths with wrong type/values, I get a default message which isn't human readable
"message": "request body has an error: doesn't match the schema: Error at <fieldName>: Doesn't match schema \"oneOf\"".
I'd like to create a custom error message for each component.
I'd appreciate your help 🙂