-
-
Notifications
You must be signed in to change notification settings - Fork 209
basic support to test against official JSON-Schema-Test-Suite #122
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
basic support to test against official JSON-Schema-Test-Suite #122
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.
Good work! Can you add draft 5 and draft 6?
It should be added incrementally or what do you mean? |
Would it be hard to just add it to this PR? |
The |
I added draft 6,7 of the |
@mcollina one important note: I had to add explicitly the |
Do we really need to support Node 4 ? |
We should actually behave properly and assume the same, it shouldn't be hard to patch.
We can bump the major without much problems if it's just for the support. |
I think it is very hard because we have to handle the e.g schema {
"properties": {
"foo": {},
"bar": {}
},
"required": ["foo"]
} this is valid: {"foo": 1} |
Great, I will remove node 4 from the matrix. |
Please check again I infer type based on the validation keywords. |
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.
Good work, this is fantastic. I've just left a couple of nits.
.travis.yml
Outdated
@@ -1,7 +1,6 @@ | |||
language: node_js | |||
sudo: false | |||
node_js: | |||
- '4' | |||
- '6' | |||
- '8' | |||
- '9' |
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.
can you drop 9 as well?
'exclusiveMaximum', | ||
'minimum', | ||
'exclusiveMinimum' | ||
] |
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 would just use const
for these.
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.
LGTM
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.
Great work!
This PR will add basic support to test against the official https://github.com/json-schema-org/JSON-Schema-Test-Suite. It contains only tests for the
required
feature.