Skip to content

Some inconsistencies in output schema #949

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

Closed
stan-sb opened this issue Jun 18, 2020 · 2 comments · Fixed by #1285
Closed

Some inconsistencies in output schema #949

stan-sb opened this issue Jun 18, 2020 · 2 comments · Fixed by #1285

Comments

@stan-sb
Copy link
Contributor

stan-sb commented Jun 18, 2020

https://github.com/json-schema-org/json-schema-spec/blob/master/output/schema.json
https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.10

  1. "basic", "detailed" and "verbose" are defined exactly the same, which means, if output is valid for one of them, it is valid for all of them. This means that, unless the output format is flag, the "oneOf" validation would always fail.

-- Output schema requires "errors" key in case "valid" is false;
-- "errors" is recursively defined as array of "outputUnit"
-- "valid" is required
This means the only way to terminate recursion in case of "valid": false is to include "errors": [], which is misleading.
On the other hand, the output examples sometimes contain "error" key and not "errors". Although not strictly necessary, it'd be good to have "error" defined in the schema.

@gregsdennis
Copy link
Member

I put in the output schema as kind of a bonus to that section of the spec. It's more of an afterthought than anything. Correct away!

@gregsdennis
Copy link
Member

This will be addressed by #1285. The output format has changed considerably anyway, and the associated schema needed to be rewritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants