protoc-gen-openapi: Enum types that use stringified boolean values like `"TRUE"` are treated as the real boolean values
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
## env
- protoc-gen-openapi: v0.6.8
- protoc flags: `--openapi_opt naming=proto,enum_type=string`
## proto file
```protobuf
enum Trinary {
NULL = 0;
TRUE = 1;
FALSE = 2;
}
message Condition {
Trinary attached = 1;
}
```
## expected output
```yaml
Condition:
type: object
properties:
attached:
enum:
- 'NULL'
- 'TRUE'
- 'FALSE'
type: string
format: enum
```
## actual output
```yaml
Condition:
type: object
properties:
attached:
enum:
- NULL
- TRUE
- FALSE
type: string
format: enum
```
-----
I know it's better not to use reserved words, so this is just for usage feedback.
Contributor guide
Assessment
This issue has not been assessed yet.