google / google/gnostic

How to generate a completable enum field description from .proto file?

Open
#463 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.3k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

I attempt to generate a openapi.yaml like this,(just an example)
```yaml
parameters:
- name: weather
schema:
type: integer
format: int32
enum:
- 1
- 2
- 3
x-enum-descriptions:
- 'Blue sky'
- 'Slightly overcast'
- 'Take an umbrella with you'
```
But I only got
```yaml
parameters:
- name: weather
schema:
type: integer
format: enum
```
or
```yaml
parameters:
- name: weather
schema:
type: string
format: enum
enum:
- BLUE_SKY
- XXXXX
- YYYY
```

I can't found any openapi annotation for enum type, How can I do it ?

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.