APIDevTools / swagger-parser

Swagger 2.0 and OpenAPI 3.0 parser/validator
https://apitools.dev/swagger-parser
MIT License
1.08k stars 153 forks source link

Report all errors from Ajv's schema validation #213

Closed erickgarro closed 2 years ago

erickgarro commented 2 years ago

Users should be able to get all the errors resulting from the validation, not just the first one. Then they can decide how to use the information.

Knowing if a schema is valid or not might be enough for simple use cases, but if we implement this minor modification, we'll be enabling more use cases.

For example, we are currently working on a text-to-model transformation tool to visualize OAS as trees. We want to show the user where there are errors in their code.

This issue was reportedly fixed in an older version when z-schema was used but somehow was brought back into the latest version.