Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.

Draft 6 support #114

Open
matt-allan opened this issue Apr 24, 2017 · 7 comments
Open

Draft 6 support #114

matt-allan opened this issue Apr 24, 2017 · 7 comments
Milestone

Comments

@matt-allan
Copy link
Collaborator

This is already supported by the dereferencer.

We need a new rule set and constraints.

@handrews
Copy link

handrews commented May 8, 2017

draft-06 is out!

Guide for core and validation
Guide for hyper-schema

@matt-allan matt-allan modified the milestones: 1.0, 2.0 Jun 26, 2017
@danballance
Copy link

danballance commented Oct 17, 2017

Hi, just reading this issue through. Does this mean I can validate (pretty simple) Draft 6 schemas with json-guard? PHP support for draft 6 looks non-existent atm and I need draft 6 for the "named enum" work around described here:

json-schema-org/json-schema-spec#57

This issue looks promising. Anything I can do to help if this isn't already working out of the box?

@handrews
Copy link

@danballance in the meantime, you can always use a single-element enum in place of const as a further workaround. {"const": 42} is just shorthand for {"enum": [42]}. It's easier to read, and easier for tools to recognize as a special case for code or UI generation, but the validation effect is the same.

@matt-allan
Copy link
Collaborator Author

Hello,

Hi, just reading this issue through. Does this mean I can validate (pretty simple) Draft 6 schemas with json-guard?

Not yet. json-reference will mostly work with Draft 6 schemas (it supports $id) but this library doesn't support it yet.

Anything I can do to help if this isn't already working out of the box?

To support draft 6 we need a new rule set (see the docs for more info) and constraints for the changes in Draft 6. Most of the constraints can probably decorate the draft 4 version to add the new logic. The JSON Schema Test Suite will need to be updated to pull in the draft 6 tests (see composer.json) and you can use that to write the new rule set.

If you or someone else wants to tackle that let me know and I can answer any questions. I probably won't have time to do this myself anytime soon. I am planning on tackling #122 first since I need it for work.

@danballance
Copy link

@handrews yes that's what we are doing for now. Although I am seeing some other features in draft 6 that we could make use of.

@yuloh thanks for clarifying. I am considering trying to take this on as a weekend project, but I'm not free now until January 2018. I really would like to help with this. I'll see what I can organise in my home life and come back to you.

@handrews
Copy link

handrews commented Nov 2, 2017

@danballance @yuloh Note that draft-07 is now nearing publication

@philsturgeon
Copy link
Member

@yuloh ping Draft 7 is out!

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

No branches or pull requests

4 participants