jhthorsen / json-validator

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

JSON::Validator::OpenAPI - can't see good alternative #145

Closed mohawk2 closed 5 years ago

mohawk2 commented 5 years ago

Previously to JV 3, there was available JSON::Validator::OpenAPI. Now it's been deleted. Mojolicious::Plugin::OpenAPI has JSON::Validator::OpenAPI::Mojolicious, which blandly says "use Mojolicious::Plugin::OpenAPI, not this directly".

Previously, various not-directly-Mojo libraries were using JSON::Validator::OpenAPI, to encapsulate an actual OpenAPI spec, not just a generic JSON Schema spec.

It seems that there is now not a way to encapsulate an actual OpenAPI spec. Can you update the docs to show how to do that post this change? Or even restore JSON::Validator::OpenAPI. Given those libraries aren't Mojo, there is no obvious way to use Mojolicious::Plugin::OpenAPI to replace this capability.

jhthorsen commented 5 years ago

I doubt this will be fixed, since I don't really want to mix OpenAPI with JSON::Validator.

What do you mean with "Previously, various not-directly-Mojo libraries were using"? Which libraries is that?

mohawk2 commented 5 years ago

The three that I linked to this issue, for a start.

jhthorsen commented 5 years ago

I don't see any reason for those two projects to use JSON::Validator::OpenAPI::Mojolicious instead of JSON::Validator.

mohawk2 commented 5 years ago

For the same reason that this is not a blank page: https://metacpan.org/pod/release/JHTHORSEN/JSON-Validator-2.19/lib/JSON/Validator/OpenAPI.pm

That an OpenAPI spec has slightly different requirements from other types of JSON Schema.

jhthorsen commented 5 years ago

I’m going to close this issue unless you can actually tell me why you can’t use JSON::Validator.