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

Support for JSON Schema Draft 06 #395

Open
lurraca opened this issue Aug 28, 2017 · 10 comments
Open

Support for JSON Schema Draft 06 #395

lurraca opened this issue Aug 28, 2017 · 10 comments

Comments

@lurraca
Copy link

lurraca commented Aug 28, 2017

Since there's not mention of JSON Schema Draft 06 on the readme, the number of ignored test files and some basic manual testing I am assuming that the gem does not support it.

Is my guess correct or am I missing something?
If it's not supported, is there any plan for it? Maybe I can try and send a PR for it?

edited: typo on Schema Draft version, from 05 to 06.

@iainbeeston
Copy link
Contributor

The default (and best supported) schema draft is draft 05. Most of the ignored tests for draft 05 are optional tests that are difficult to validate correctly. If you don't specify a schema version draft 05 will be used.

However, did you mean to say draft 05 or draft06? (The title of your issue says draft 06) but the body mentions draft 05). Right now draft 06 support should be considered experimental, and we haven't added support for any of the new features in draft 06. That's largely because (last I checked) draft 06 wasn't finalised. But if you would like to open a PR for better draft 06 support it would be very, very welcome! I'd suggest opening a pull request per draft 06 feature or set of tests from the common test suite that are currently being ignored.

@lurraca
Copy link
Author

lurraca commented Aug 28, 2017

@iainbeeston thanks for the quick reply. I made a mistake on the body, I am referring to Draft06.

I might be mistaken, but it seems to me that draft 06 is final.

From json-schema.org

The latest Internet-Drafts at the IETF are the draft-wright-json-schema*-01 documents, which correspond to the draft-06 meta-schemas.

Even the links for the metaschema will point to draft06 http://json-schema.org/schema

@handrews
Copy link

Hi folks- draft-07 is now out. In terms of validation and core, it is a fairly minor release, and is backwards-compatible with draft-06.

https://tools.ietf.org/html/draft-handrews-json-schema-00
https://tools.ietf.org/html/draft-handrews-json-schema-validation-00

Release notes: http://json-schema.org/draft-07/README.html

@handrews
Copy link

@iainbeeston are you working towards draft-06 or newer support? Both draft-06 and draft-07 have been published, and we are now working towards draft-08.

There are now draft-06 implementations in several languages, but not Ruby that I know of.

I am checking in because we are changing json-schema.org to highlight projects that have implemented draft-06 or newer, or area at least working towards modern draft support.

@davishmcclurg
Copy link

@handrews I recently wrote a draft-07 compatible Ruby implementation: https://github.com/davishmcclurg/json_schemer It's obviously not as mature as ruby-json-schema, but it might work for people that need support for newer drafts (I needed propertyNames).

@handrews
Copy link

@davishmcclurg thanks! I'll add that to our list of implementations.

@erichulburd
Copy link

@davishmcclurg That's great to have a Ruby implementation. Moving forward do you see davishmcclurg/json_schemer taking the torch from ruby-json-schema/json-schema? Is there any particular support you need for davishmcclurg/json_schemer?

@davishmcclurg
Copy link

@erichulburd I don't have anything particular planned for it. I think it mostly needs people to use it and suggest improvements. Feel free to open an issue (or pull request) if you have any questions or suggestions. Thanks!

@handrews
Copy link

@davishmcclurg since it's the only Ruby implementation with post-draft-04 support, it now has prominent placement at json-schema.org http://json-schema.org/implementations.html#validator-ruby, and I've pointed some people to it. Hopefully that will get some usage and feedback for you!

@davishmcclurg
Copy link

Awesome, thanks @handrews! That explains the increased interest.

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

No branches or pull requests

5 participants