swagger-tools icon indicating copy to clipboard operation
swagger-tools copied to clipboard

Required validation errors do not follow the schema documented

Open dmorgantini opened this issue 6 years ago • 1 comments

https://github.com/apigee-127/swagger-tools/blob/361c1f6f08aed64c8da1784cef5ea61a83bac787/lib/validators.js#L169-L183

^ This code demonstrates how your validators translate from a validation error into the documented schema for validation errors. https://github.com/apigee-127/swagger-tools/blob/master/docs/Middleware.md#validation-errors

https://github.com/apigee-127/swagger-tools/blob/361c1f6f08aed64c8da1784cef5ea61a83bac787/lib/validators.js#L449-L453

^ This code shows that for Required fields the same transformation is not applied.

dmorgantini avatar Apr 13 '18 12:04 dmorgantini

ps: happy to wire up a pr to fix if it's something that you would accept.

dmorgantini avatar Apr 13 '18 12:04 dmorgantini