Skip to content

Conversation

@tstirrat15
Copy link
Contributor

Fixes #151

Description

We have several enums where the 0 value is reserved as unused, and shouldn't be supplied or observed in the normal course of operation. We've gotten some questions about whether these enums need to be handled; adding this to the Buf documentation should clarify that.

Changes

  • Add clarification to UNSPECIFIED fields

Testing

Review.

@tstirrat15 tstirrat15 requested review from josephschorr and vroldanbet and removed request for josephschorr November 18, 2025 18:08
@github-actions
Copy link

The latest Buf updates on your PR. Results from workflow Lint / lint (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 18, 2025, 6:08 PM


message PermissionChange {
enum Permissionship {
// Unspecified is an unused default value that should not be encountered in normal operation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps I would reframe it as "it's used to signal some edge case triggered in the server side, and that something went wrong, and that clients are expected to just error out"

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.

Add documentation to enum values that won't be returned in normal operation

3 participants