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

Nested enum support in Protobuf message #713

Closed
juha-aiven opened this issue Sep 12, 2023 · 0 comments · Fixed by #716
Closed

Nested enum support in Protobuf message #713

juha-aiven opened this issue Sep 12, 2023 · 0 comments · Fixed by #716

Comments

@juha-aiven
Copy link
Contributor

What is currently missing?

An enum embedded in a message is currently not supported:

syntax = "proto3";

package x.y.;
message MyMessage {
  message MyNestedMessage {
    enum MyNestedEnum {
      VALUE_1 = 0;
    }
    MyNestedEnum enum1 = 1;
  }
}

The workaround is to move the nested enum to top level:

syntax = "proto3";

package x.y.;
enum MyNestedEnum {
  VALUE_1 = 0;
}
message MyMessage {
  message MyNestedMessage {
    MyNestedEnum enum1 = 1;
  }
}

How could this be improved?

Add the support.

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 a pull request may close this issue.

1 participant