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

How to represent REQUIRED on oneof fields. #336

Open
kommendorkapten opened this issue May 28, 2024 · 0 comments · May be fixed by #337
Open

How to represent REQUIRED on oneof fields. #336

kommendorkapten opened this issue May 28, 2024 · 0 comments · May be fixed by #337
Assignees

Comments

@kommendorkapten
Copy link
Member

The best option for marking a oneof field as required; i.e that exactly one of the fields must be set seems be in flux. Currently we are marking all fields in the oneof as required, which appeared to be the preferred way, link. Marking all fields as required seems to cause problems for Go reflection based field validation: sigstore/sigstore-go#63 (comment)

According to this issue, there is an alternative approach. Let's explore that and see if it solves the issues we are facing, and also the annotations per that issue is more visually appealing. There is also a PR to disallow field_behavior on oneof so updating makes sense.

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 a pull request may close this issue.

1 participant