-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protoc-gen-openapiv2: option to add swagger extensions to enums #4908
Comments
Hi, I'm confused what you're asking for here. What do you want an enum extension to do? The grpc-gateway implements the spec as provided by http.proto. I don't believe there is any enum functionality missing. |
Im sorry, my initial issue title was sort of misleading. I'd like to add swagger extensions to enums like it's already possible with protobuf messages using the Schema proto option. |
Do you have a specific use case? I think I understand a bit better but I still would like to get to the real requirement. Are you currently post-processing your openapi files? |
We generate our SDK from the openapi files and use the swagger extensions to control visibility, type naming etc. For example our enums in the openapi spec look like this: v2ClusterStatusState:
default: STATE_UNSPECIFIED
enum:
- STATE_UNSPECIFIED
- STATE_HEALTHY
- STATE_CREATING
- STATE_DELETING
- STATE_UNHEALTHY
- STATE_RECONCILING
- STATE_HIBERNATED
- STATE_HIBERNATING
- STATE_WAKINGUP
title: ClusterStatusState holds information about the current state of the Cluster
type: string
x-stackit-sdk:
schema-name: ClusterStatusState The |
Just realized this is a dupe of #2671. Thanks for reporting it. |
🚀 Feature
It would be great if it was possible to add swagger extensions to proto enums.
We currently rely on extension pretty heavily and it's unfortunate that you can provide extensions to messages but not to enums.
The text was updated successfully, but these errors were encountered: