-
Notifications
You must be signed in to change notification settings - Fork 46
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
[#566] Add meta-schema.json and test using it. #611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a few comments. It might be good for easier change-tracking to first commit the draft-04 schema, and then commit our changes, so that we can easily see the divergence when reviewing history.
standard/schema/meta-schema.json
Outdated
"anyOf": { "$ref": "#/definitions/schemaArray" }, | ||
"oneOf": { "$ref": "#/definitions/schemaArray" }, | ||
"not": { "$ref": "#" }, | ||
"$ref": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For $ref
, draft-06 has:
"$ref": {
"type": "string",
"format": "uri-reference"
},
though we'd use "format": "uri"
for draft-04.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issue here is that internal $ref i.e '#/definitions/Awards' would not pass "uri" validataion. Which I think is why they added the new format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, makes sense.
standard/schema/meta-schema.json
Outdated
"type": "boolean", | ||
"default": false | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra line.
Add script make_metaschema.py to make meta-schema.json from patch and draft-04. Also add test to make sure this is run.
dc46a36
to
6e53825
Compare
@@ -31,14 +31,15 @@ def object_pairs_hook(pairs): | |||
|
|||
|
|||
DRAFT_SCHEMA_PATH = path(__file__).parent / 'json-schema-draft-4.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constant's value needs to be updated because the file moved in another commit, but if we aren't using the constant anymore, we can just remove it.
related #566