-
Notifications
You must be signed in to change notification settings - Fork 232
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
Improve JSON Schema for event types and reasons #97
Comments
This is a little fiddly in jsonschema, and has the additional drawback of inducing relatively poor error messages. I think this (stripped-down) example might work:
(inspired by the last example in the import pane of http://jsonvalidate.com/ which sadly doesn't let you deep-link) |
This is interesting, I guess the problem is all the the rest of the fields would need to be repeated inside each A different (and breaking) idea is to define |
It's possible to still have a top-level Packaging status updates would make it a little easier from a validation perspective, but not necessarily from a generation or consumption one. Since validation will hopefully be automatic anyway, and this seems to work, I don't know that it's worth introducing minor but breaking changes before anyone's put any real miles on the API.. |
The spec defines these enums in somewhat of a hierarchy, e.g. each
event_type_reason
applies only to a specificevent_type
.However the current schemas don't enforce this hierarchy. This should be addressed going forward.
Earlier discussion here and here.
The text was updated successfully, but these errors were encountered: