Skip to content
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

Add support for custom options on: oneofs, enums, and enum values #562

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jcready
Copy link
Contributor

@jcready jcready commented Jul 6, 2023

Fixes: #37 and #537

@@ -37,6 +37,9 @@ import type {JsonValue} from "./json-typings";
* Because the JSON format requires the original value name, we store the
* dropped prefix here, so that the JSON format implementation can restore
* the original value names.
*
*
* [3] the options for the enum and enum values (optional)
*/
export type EnumInfo = readonly [
Copy link
Contributor Author

@jcready jcready Aug 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a rather unfortunate structure compared to the MessageInfo. Maybe in v3 this can be updated to an object instead of an array/tuple.

@fython
Copy link

fython commented Jan 12, 2024

May I know the latest status of this PR? I think these cool changes can bring benefits to many projects. I am trying to add description text by enum value options for some protobuf enum defined for objects status, and I read these options value in order to show on pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Enum / Enum value options
2 participants