jhthorsen / json-validator

:cop: Validate data against a JSON schema
https://metacpan.org/release/JSON-Validator
56 stars 58 forks source link

Add schema classes for validating OpenAPIv2 request/responses #229

Closed jhthorsen closed 3 years ago

jhthorsen commented 3 years ago

Summary

This PR will in the future contain logic for validating requests and responses for OpenAPIv2. When (?) it gets merged, the new schema class will be marked as EXPERIMENTAL, since OpenAPIv3 also needs to be implemented and Mojolicious::Plugin::OpenAPI must become compatible with the new logic.

This PR will not include any introspection, unless it is required to make the validation work.

This is currently a "Draft", since it is incomplete.

Motivation

It's a mess keeping JSON::Validator::OpenAPI::Mojolicious compatible with the new OpenAPIv3 spec, as well as not breaking OpenAPIv2 support.

References

jhthorsen commented 3 years ago

Closing this PR, since I'm renaming the branch.