json-schema-spec icon indicating copy to clipboard operation
json-schema-spec copied to clipboard

Output unit schema inconsistent with spec

Open tombentley opened this issue 1 year ago • 4 comments

The 2020-12 spec says this about successful validations:

The JSON key for failed validations is "error"; for successful validations it is "annotation".

A later sentence draws an explicit contrast for the case of nested results :

Note the plural forms, as a keyword with nested results can also have a local error or annotation.

But the output schema only defines a property for the plural annotations and not the singular annotation.

tombentley avatar May 03 '24 01:05 tombentley

The output schema defines error because errors are only strings. It doesn't define a subschema for annotation because annotations can be of any value.

gregsdennis avatar Jun 18 '24 22:06 gregsdennis

Wouldn't it be clearer to use annotation: true to define the property in that case? At least that way annotation is present in the schema. When I read the text I found it confusing that something was mentioned in the text (not in an especially clear way, imho) but not even present in the schema.

tombentley avatar Jun 18 '24 23:06 tombentley

I see your point. Intentionality is worth something.

I'll go ahead and reopen this, but it'll be for an errata correction. I'm not sure how to make that change since the file has already moved on to the next version of the output. This might need to be done in the website repo.

gregsdennis avatar Jun 18 '24 23:06 gregsdennis

I'm not sure how to make that change since the file has already moved on to the next version of the output.

There's branch for each release. You can make the change on top of that branch.

jdesrosiers avatar Jun 18 '24 23:06 jdesrosiers