Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAPI schema classes #189

Closed
wants to merge 1 commit into from
Closed

Add OpenAPI schema classes #189

wants to merge 1 commit into from

Conversation

@jhthorsen
Copy link
Member

@jhthorsen jhthorsen commented Feb 11, 2020

Summary

This change aims to make it possible to move logic from JSON::Validator into the different JSON::Validator::Schema subclasses, but at the same time be backward compatible. After merging this PR, I need to update Mojolicious::Plugin::OpenAPI before moving the actual validation methods. (I think)

Motivation

Same motivation as #209.

References

#209 and #210

@jhthorsen jhthorsen self-assigned this Feb 11, 2020
@jhthorsen jhthorsen force-pushed the jhthorsen/schema-classes branch 5 times, most recently from 290aa36 to 709bd26 Feb 11, 2020
@jhthorsen jhthorsen force-pushed the jhthorsen/schema-classes branch 3 times, most recently from 2359d4c to 7b7855d Feb 14, 2020
@jhthorsen jhthorsen force-pushed the jhthorsen/schema-classes branch 2 times, most recently from 095610c to 3522db4 Feb 19, 2020
@karenetheridge
Copy link
Contributor

@karenetheridge karenetheridge commented Mar 27, 2020

What is the purpose of the subclasses OpenAPIv2 and OpenAPIv3?

t/openapi3-invalid-refs.t Outdated Show resolved Hide resolved
t/openapi3-invalid-refs.t Outdated Show resolved Hide resolved
@jhthorsen
Copy link
Member Author

@jhthorsen jhthorsen commented Apr 8, 2020

What is the purpose of the subclasses OpenAPIv2 and OpenAPIv3?

They are part of the validation family. JSON::Validator is a generic validator, meaning it's only the schemas that enforces a given version.

@jhthorsen jhthorsen changed the title Changed $jv->schema to hold a JSON::Validator::Schema object [WIP] Changed $jv->schema to hold a JSON::Validator::Schema object Apr 8, 2020
@jhthorsen jhthorsen force-pushed the jhthorsen/schema-classes branch from 3522db4 to 292b138 Apr 8, 2020
@HEM42
HEM42 approved these changes Apr 8, 2020
lib/JSON/Validator/Schema/OpenAPIv3.pm Show resolved Hide resolved
lib/JSON/Validator/Schema/OpenAPIv3.pm Show resolved Hide resolved
@jhthorsen jhthorsen force-pushed the jhthorsen/schema-classes branch 2 times, most recently from 27af8a1 to ae6f8ca Apr 9, 2020
@jhthorsen jhthorsen changed the title [WIP] Changed $jv->schema to hold a JSON::Validator::Schema object [WIP] Add more schema classes Apr 10, 2020
@jhthorsen jhthorsen changed the title [WIP] Add more schema classes [WIP] Add OpenAPI schema classes Apr 10, 2020
@jhthorsen jhthorsen force-pushed the jhthorsen/schema-classes branch 3 times, most recently from 2a8704d to 5b7dc2b Apr 10, 2020
@jhthorsen jhthorsen force-pushed the jhthorsen/schema-classes branch from 3e6a887 to 9b0c87e Apr 19, 2020
@jhthorsen jhthorsen removed the wip label Apr 19, 2020
@jhthorsen jhthorsen changed the title [WIP] Add OpenAPI schema classes Add OpenAPI schema classes Apr 19, 2020
@jhthorsen
Copy link
Member Author

@jhthorsen jhthorsen commented Apr 19, 2020

I think this branch is ready for merging now, but I'll keep it open until I'm done with jhthorsen/mojolicious-plugin-openapi#160

@jhthorsen
Copy link
Member Author

@jhthorsen jhthorsen commented Jun 8, 2020

I'm going to close this for now and open a new PR later on. Going to focus on making J::V compatible with the existing M::P::OpenAPI first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.