-
Notifications
You must be signed in to change notification settings - Fork 64
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
bump JSON Schema test suite #109
Conversation
FYI, I'm working on it |
* enum check on draft-3 should compare integers and floats just fine * reset "current schema" in "extends" / "anyOf" / "allOf" etc
Have some difficulties with |
ok, found a workaround for "ref overrides any sibling keywords", but now discovered those "Location-independent identifier". Seems it works similar to |
{<<"ref">>, <<"Location-independent identifier">>} | ||
, {<<"ref">>, <<"Recursive references between schemas">>} | ||
, {<<"ref">>, <<"Location-independent identifier with base URI" | ||
" change in subschema">>} |
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.
so, 3 test-cases are skipped. Seems all 3 require "arbitrary document-local reference URI lookups" / "location indpendent identifiers", but it seems it would be very difficult to implement them efficiently. Naive way would be to just do recursive descent from #state.root_schema
.
@andreineculau I fixed all the tests except 3 I explicitly skipped. I may try to spend some more time on it, but not sure it worth it, because it would be very difficult to implement it efficiently; also I doubt those features are popular... |
👋 |
Let's say that I'll merge it this Wednesday 8th of December, if there will be no objections until then =) |
%% Instead of just removing all the other fields, we put schema as | ||
%% 1st element, so, only `ref' will be validated, while other fields | ||
%% (say, `definitions') may still be referenced. | ||
[{?REF, Ref} | lists:keydelete(?REF, 1, NewSchema0)] |
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 looks like it crashes when the schema is a map
. We caught this today before shipping some code to production... is there a reason not to support map format schemas here? It seems to work elsewhere.
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.
No, this was not intentional. I'll make a fix
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.
Hi @nalundgaard, may you please check that fix from #113 works for you?
as per #107
doing this separately from #108 because there are failing tests in draft3 and draft4 i.e. jesse's current implementation fails some "corner" cases
WORK IN PROGRESS