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

[proto2json] bug: enum type not parsed #27

Open
miklosbagi opened this issue Jun 11, 2024 · 0 comments
Open

[proto2json] bug: enum type not parsed #27

miklosbagi opened this issue Jun 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@miklosbagi
Copy link
Owner

Example proto file:

syntax = "proto3";
package endlessloopbugtest;
option go_package = "github.com/miklosbagi/gopickers/bug";

service bugService {
	rpc BugMethod (BugRequest) returns (BugResponse);
}

message BugRequest {
    string id = 1;
}

message BugResponse {
	string bug_id = 1;
	enum EmbeddedEnumTest {
		TEST_ENUM_EMBEDDED = 0;
	}
    EmbeddedEnumTest embedded_enum = 2;
	EnumBug referenced_enum = 3;
}

enum EnumBug {
	ONE_TEST_ENUM = 0;
}

In both embedded and externally referenced enum scenarios, enum values are not pulled in.

Response:

{
    "bug_id": "c4a1c65e-c89b-4ee3-83ca-e00beb29540a",
    "embedded_enum": "ENUM_VALUE_MAX",
    "referenced_enum": "ENUM_VALUE_MAX"
}

Expected response:

{
    "bug_id": "c4a1c65e-c89b-4ee3-83ca-e00beb29540a",
    "embedded_enum": "0",
    "referenced_enum": "0"
}

Randomizing returned enum values based on options available is preferred.

@miklosbagi miklosbagi added the bug Something isn't working label Jun 11, 2024
@miklosbagi miklosbagi self-assigned this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant