-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
Update output schema to describe new structure #1285
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,75 +6,56 @@ | |
"anyOf": [ | ||
{ "$ref": "#/$defs/flag" }, | ||
{ "$ref": "#/$defs/basic" }, | ||
{ "$ref": "#/$defs/detailed" }, | ||
{ "$ref": "#/$defs/verbose" } | ||
{ "$ref": "#/$defs/hierarchical" } | ||
], | ||
"$defs": { | ||
"outputUnit":{ | ||
"properties": { | ||
"valid": { "type": "boolean" }, | ||
"keywordLocation": { | ||
"evaluationPath": { | ||
"type": "string", | ||
"format": "json-pointer" | ||
}, | ||
"absoluteKeywordLocation": { | ||
"schemaLocation": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"instanceLocation": { | ||
"type": "string", | ||
"format": "json-pointer" | ||
}, | ||
"error": { | ||
"type": "string" | ||
}, | ||
"errors": { | ||
"nested": { | ||
"$ref": "#/$defs/outputUnitArray" | ||
}, | ||
"annotations": { | ||
"$ref": "#/$defs/outputUnitArray" | ||
"type": "object", | ||
"additionalProperties": true | ||
}, | ||
"errors": { | ||
"type": "object", | ||
"additionalProperties": { "type": "string" } | ||
} | ||
}, | ||
"required": [ "valid", "keywordLocation", "instanceLocation" ], | ||
"required": [ "valid", "evaluationPath", "schemaLocation", "instanceLocation" ], | ||
"allOf": [ | ||
{ | ||
"if": { | ||
"required": [ "errors" ] | ||
}, | ||
"then": { | ||
"properties": { | ||
"valid": { "const": false } | ||
} | ||
}, | ||
"then": { | ||
"anyOf": [ | ||
{ | ||
"required": [ "error" ] | ||
}, | ||
{ | ||
"required": [ "errors" ] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"anyOf": [ | ||
{ | ||
"properties": { | ||
"keywordLocation": { | ||
"pattern": "/\\$ref/" | ||
} | ||
} | ||
}, | ||
{ | ||
"properties": { | ||
"keywordLocation": { | ||
"pattern": "/\\$dynamicRef/" | ||
} | ||
} | ||
} | ||
] | ||
"required": [ "annotations" ] | ||
}, | ||
"then": { | ||
"required": [ "absoluteKeywordLocation" ] | ||
"properties": { | ||
"valid": { "const": true } | ||
} | ||
} | ||
} | ||
] | ||
|
@@ -89,8 +70,15 @@ | |
}, | ||
"required": [ "valid" ] | ||
}, | ||
"basic": { "$ref": "#/$defs/outputUnit" }, | ||
"detailed": { "$ref": "#/$defs/outputUnit" }, | ||
"verbose": { "$ref": "#/$defs/outputUnit" } | ||
"basic": { | ||
"properties": { | ||
"valid": { "type": "boolean" }, | ||
"nested": { | ||
"$ref": "#/$defs/outputUnitArray" | ||
} | ||
}, | ||
"required": [ "valid", "nested" ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does the 'basic' format contain 'nested'? My understanding was that basic is still a flat structure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Basic is an object with only {
"valid": true,
"nested": [ <flat list> ]
} This provides the overall validation result at the root and a flat list. It's the same as 2020-12, except that the location properties aren't required at the root (because they're always just |
||
}, | ||
"hierarchical": { "$ref": "#/$defs/outputUnit" } | ||
} | ||
} |
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.
Shouldn't this be iri now?
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.
ah I see you're already on it, re the other PR about uri->iri changes.
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'm going to push this forward as I can't wait on your PR any longer. It needs to be rebased anyway.