Skip to content

Validate MessageOneofRule#257

Merged
smaye81 merged 2 commits intomainfrom
sk/oneof
Jun 12, 2025
Merged

Validate MessageOneofRule#257
smaye81 merged 2 commits intomainfrom
sk/oneof

Conversation

@srikrsna-buf
Copy link
Copy Markdown
Contributor

bufbuild/protovalidate#379.

This also includes minor refactor to be consistent.

Signed-off-by: Sri Krishna <skrishna@buf.build>
@srikrsna-buf srikrsna-buf requested a review from timostamm June 12, 2025 04:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 12, 2025

The latest Buf updates on your PR. Results from workflow Buf / validate-protos (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 12, 2025, 8:59 PM

Comment thread message_oneof.go
// fields, ensuring that only one is set. If `required` is true, it enforces that one of
// the fields _must_ be set.
type oneofEvaluator struct {
type messageOneof struct {
Copy link
Copy Markdown
Contributor Author

@srikrsna-buf srikrsna-buf Jun 12, 2025

Choose a reason for hiding this comment

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

There is a oneof type which evaluates the oneof rules, and none of the others have the Evaluator suffix

Comment thread builder.go
cache messageCache,
){
bldr.processMessageExpressions,
bldr.processMessageOneofRules,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🙏

@smaye81 smaye81 merged commit 83aef6c into main Jun 12, 2025
7 checks passed
@smaye81 smaye81 deleted the sk/oneof branch June 12, 2025 21:34
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.

3 participants