googleapis / googleapis/api-linter

"Enum unspecified value" rule inaccurate to AIP

Open
#1,273 0 comments 0 reactions 0 assignees View on GitHub
priority: p2 type: bug
Dominant language
Go
Stars
765
Forks
181
Avg merge
2d 12h
Merged PRs (30d)
3

Description

#### Steps to reproduce

1. Write an enum with a meaningful zero value
2. Enable strict API linter
3. Linter flags missing `_UNSPECIFIED` value

The issue here is that the [AIP itself](https://google.aip.dev/126) has an exception for a "clearly useful zero value". This means that even in the strict API linter it should be possible to have an enum with a meaningful zero value because it's *an exception to the rule*, not just an ignored **should**.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.