jhthorsen / json-validator

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

Add support for OpenAPI3 nullable property #146

Closed augensalat closed 5 years ago

augensalat commented 5 years ago

Summary

This is an attempt to implement support for OpenAPI3 nullable property. Beware! It is a "works-for-me" patch.

Motivation

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#fixed-fields-20 is currently broken in JSON::Validator.

References

https://github.com/jhthorsen/mojolicious-plugin-openapi/issues/106

jhthorsen commented 5 years ago

I don't want this change to be applied to JSON::Validator. Can you apply it to https://github.com/jhthorsen/mojolicious-plugin-openapi/blob/master/lib/JSON/Validator/OpenAPI/Mojolicious.pm instead?

jhthorsen commented 5 years ago

This PR could've closed https://github.com/jhthorsen/mojolicious-plugin-openapi/issues/106, but I still don't think it's a good idea to add this to JV, when it's OpenAPI specific.