Skip to content
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

Issue-949: Fixing inconsistencies in output schema #950

Merged
merged 2 commits into from
Oct 1, 2020

Conversation

stan-sb
Copy link
Contributor

@stan-sb stan-sb commented Jun 19, 2020

  1. Changing "oneOf" to "anyOf", because basic, detailed and verbose have the same definition, oneOf would fail validation.
  2. Adding "error" keyword and making either "error" or "errors" required in case "valid" is false.

1. Changing "oneOf" to "anyOf", because basic, detailed and verbose have the same definition, oneOf would fail validation.
2. Adding "error" keyword and making either "error" or "errors" required in case "valid" is false.
@karenetheridge
Copy link
Member

There are some overlaps with #938 and #940.

@stan-sb
Copy link
Contributor Author

stan-sb commented Jun 22, 2020

Looking at #938 and #940, these changes are distinct from both of them.

@karenetheridge
Copy link
Member

#940 also addresses oneOf -> anyOf.

@stan-sb
Copy link
Contributor Author

stan-sb commented Jun 23, 2020

#940: Line #49: oneOf -> anyOf
#950: Line #6: oneOf -> anyOf

@handrews
Copy link
Contributor

handrews commented Sep 4, 2020

@karenetheridge has @stan-sb addressed your concerns with his last comment? I'd like to get a review from either you or @gregsdennis and get this merged if it is correct.

@handrews
Copy link
Contributor

@gregsdennis @karenetheridge any update on this? I'd like to get it merged or rejected, whichever is appropriate. We need to wrap up this draft and this has been open for 3 months now.

@handrews handrews added this to the draft-08-patch1 milestone Sep 26, 2020
@gregsdennis
Copy link
Member

I have no strong feelings. I had used oneOf because logically only one of the formats can be used. But their schemas do overlap somewhat, so... sure.

@@ -41,7 +44,14 @@
}
},
"then": {
"required": [ "errors" ]
"oneOf": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyOf here, too. Don't preclude having both.

Make anyOf (instead of oneOf) consistent.
@handrews handrews merged commit 27f89d4 into json-schema-org:master Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants