the output format examples does not validate with the output schema #364
Answered
by
gregsdennis
santhosh-tekuri
asked this question in
Q&A
-
below is the basic output format example from spec: {
"valid": false,
"errors": [
{
"keywordLocation": "",
"instanceLocation": "",
"error": "A subschema had errors."
},
{
"keywordLocation": "/items/$ref",
"absoluteKeywordLocation":
"https://example.com/polygon#/$defs/point",
"instanceLocation": "/1",
"error": "A subschema had errors."
},
{
"keywordLocation": "/items/$ref/required",
"absoluteKeywordLocation":
"https://example.com/polygon#/$defs/point/required",
"instanceLocation": "/1",
"error": "Required property 'y' not found."
},
{
"keywordLocation": "/items/$ref/additionalProperties",
"absoluteKeywordLocation":
"https://example.com/polygon#/$defs/point/additionalProperties",
"instanceLocation": "/1/z",
"error": "Additional property 'z' found but was invalid."
},
{
"keywordLocation": "/minItems",
"instanceLocation": "",
"error": "Expected at least 3 items but found 2"
}
]
} if I validate the above json with
which one is correct? the example from spec or the schema published ? |
Beta Was this translation helpful? Give feedback.
Answered by
gregsdennis
Mar 29, 2023
Replies: 1 comment
-
I hand-wrote most of this, so there are likely errors. Secondly, the output isn't really well defined, and has a lot of other issues. Lastly, the output schema is really informational at best. It's not intended to be prescriptive; it's a convenience. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
santhosh-tekuri
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hand-wrote most of this, so there are likely errors.
Secondly, the output isn't really well defined, and has a lot of other issues.
Lastly, the output schema is really informational at best. It's not intended to be prescriptive; it's a convenience.