-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Extend google.protobuf.EnumOptions #2671
Comments
Hm, this sounds reasonable. It would require adding a new extension here: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-openapiv2/options/annotations.proto, and then weaving through the logic for parsing this value into the generator. |
Can you explain a little bit more about how it can be achieved? |
Hi, thanks for your interest in this issue. We'd need to add a new annotation message, similar to the existing ones in the file I linked above that already exist for other types of annotations. We'd need need to add the logic for parsing this annotation into the generator. I'd recommend just searching through the code to find how we're using one of the existing messages to find the logic that does this. Once we have this information, we can then add it to the enum generation code in the Hope that helps! |
does anyone know if this feature has been added? I need to change the default value of the enums, is there any way to do this? |
I don't believe that it has been added yet. |
I will work on it these days |
I would love to use this feature and it appears the PR from 2022 is now stale. Any objection to me trying to get a new PR together for this? |
Please feel free to start your own PR, thank you! |
Sorry for the stale PR and I have closed it. |
🚀 Feature
Extend google.protobuf.EnumOptions so we can set examples on enums.
Workaround: set the example on every message using the enum.
The text was updated successfully, but these errors were encountered: