gRPC Best Practices
enum-field-names-prefix
general > enum-field-names-prefix
Guidance / Message
The zero value (UNSPECIFIED/INVALID) must be prefixed with the enum name in UPPER_SNAKE_CASE (e.g., ORDER_STATUS_UNSPECIFIED for enum OrderStatus)
Examples
valid
enum OrderStatus {
ORDER_STATUS_UNSPECIFIED = 0;
PENDING = 1;
COMPLETED = 2;
}
invalid
enum OrderStatus {
UNSPECIFIED = 0;
PENDING = 1;
COMPLETED = 2;
}
Applies to ScalarShape