-
Notifications
You must be signed in to change notification settings - Fork 145
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
WIP converting all static strings over to draft 2020-12 #343
base: main
Are you sure you want to change the base?
Conversation
@@ -1409,7 +1409,7 @@ std::shared_ptr<schema> schema::make(json &schema, | |||
|
|||
schema.erase(attr); | |||
|
|||
// special case where we break draft-7 and allow overriding of properties when a $ref is used | |||
// special case where we break draft-7 and allow overriding of properties when a $ref is used <<-- might be out-of-date now that 2020-12 is used |
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 someone help me understand the meaning in this comment?
@@ -37,7 +37,7 @@ namespace nlohmann | |||
|
|||
// A class representing a JSON-URI for schemas derived from | |||
// section 8 of JSON Schema: A Media Type for Describing JSON Documents | |||
// draft-wright-json-schema-00 | |||
// draft-wright-json-schema-00 <<-- might be incorrect now that 2020-12 is used |
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.
same as above
src/nlohmann/json-schema.hpp
Outdated
@@ -128,7 +128,7 @@ class JSON_SCHEMA_VALIDATOR_API json_uri | |||
namespace json_schema | |||
{ | |||
|
|||
extern json draft7_schema_builtin; | |||
extern json draft_2020_12_schema_builtin; |
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 left this general approach here, because I suspect that the intent is to allow for multiple versions of the schema to be included simultaneously -- and validate against the one indicated by $schema
. Is that correct?
If not, then this variable should be renamed to something more generic, like schema_builtin
.
"tests": [ | ||
{ | ||
"description": "valid definition schema", | ||
"data": { | ||
"definitions": { | ||
"$defs": { |
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 don't think this is correct; the test is still failing (er, passing when it should fail). Could someone help me understand the structure here better?
@@ -15,7 +15,7 @@ | |||
{ | |||
"description": "invalid definition schema", | |||
"data": { | |||
"definitions": { | |||
"$defs": { |
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.
same as above.
No description provided.