jhthorsen / mojolicious-plugin-openapi

OpenAPI / Swagger plugin for Mojolicious
54 stars 42 forks source link

Add support for new JSON::Validator schema API #160

Closed jhthorsen closed 3 years ago

jhthorsen commented 4 years ago

This PR has support for the new schema classes in JSON::Validator 4.11.

These classes will replace JSON::Validator::OpenAPI::Mojolicious.

The external API should have no significant changes, but the validation error messages has changed a bit:

Other things:

Please try this PR out and let me know of any regressions!

shubhaguha commented 4 years ago

Just curious now that you have pointed me to this from my PR, do you happen to have an approximate ETA for this? :)

jhthorsen commented 4 years ago

No, I don't have an ETA, but this is my focus when I have free time. https://github.com/mojolicious/json-validator/pull/189 has gotten more tests now and a much more user friendly API, but it's not quite there yet unfortunately. I think cleaning up M::P::OpenAPI will be very easy after I'm done with J::V.

jhthorsen commented 3 years ago

This branch is ready now. Please try it out 👍

zakame commented 3 years ago

Hi, @jhthorsen, nice work!

Would this change now mean that https://metacpan.org/pod/OpenAPI::Client is obsolete? Currently that module has broken tests now that JSON::Validator::OpenAPI::Mojolicious is gone.

jhthorsen commented 3 years ago

That's awful. I totally forgot about it... I'll try to find time to fix it soon.

jhthorsen commented 3 years ago

OpenAPI::Client is soon available on CPAN.

zakame commented 3 years ago

Awesome, thanks for the update!