cancel
Showing results for 
Search instead for 
Did you mean: 

custom error message for component validation

berlinGuy
Occasional Visitor

custom error message for component validation

Hey,

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

such as:

"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 🙂
 
 
New Here?
Join us and watch the welcome video: