-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add validation of required fields in the bundle #189
feat: add validation of required fields in the bundle #189
Conversation
Overall LGTM, pending figuring out the issue with required one_of fields. Thanks for adding this! |
updated the PR @haydentherapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start, though the linked issue isn't completed by this. The library you were using originally is what we need to do verification of nested fields, otherwise we're just validating top level fields.
I'm fine with merging this as-is, I've changed the PR description to not close the issue.
Would the better solution be to use the library after it has better support for oneof fields (The AIP does not state anything specific about how to handle oneof so I am not sure if we can get something added to the library) |
I think the library would be the best path forward. Maybe we can post an issue there to see if they have suggestions for handling one-ofs in a way that is AIP compliant? |
logged an issue for this in the library: einride/aip-go#300 |
@vishal-chdhry Do you want to rebase for the tests, and we'll merge this as is? |
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
8b3f34a
a0e5b0d
to
8b3f34a
Compare
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Summary
Ref #63
Sigstore bundle protobuf spec has
field_behavior
annotation which is used to describe field behavior, such as a field being required or immutable as described in AIP-203.This PR adds verification of top-level required fields in the bundle.
TODO
Fix validation of
oneof
fieldsRelease Note
Documentation