Closed avarabyeu closed 2 years ago
Hi @avarabyeu,
In the directory structure, you have provided, I don't see a file action_executor.proto
. However, the error message refers to that file. Error: illegal name ';' (action_executor.proto, line 18)
. I am assuming all.proto
and action_executor.proto
are the same files.
I tried replicating the issue using the @grpc/proto-loader
, and I am assuming the issue is with following section of the proto file
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
description: "Executes an action";
summary: "Executes an action";
};
Could you please confirm if removing the semicolons works for you?
thanks, it helps!
Describe the bug GRPC service is ignored in case custom (e.g.
grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation
) proto option is defined in the proto definition. If custom option is commented out, camouflage starts the service properly and works as expectedTo Reproduce Steps to reproduce the behavior:
import "google/protobuf/empty.proto"; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto";
service ActionExecutor { // DE Engine service implementation rpc Execute(ExecuteRequest) returns (ExecuteResponse) { option (google.api.http) = { post: "/v2/execute" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { description: "Executes an action"; summary: "Executes an action"; }; } rpc GetSupportedActions(google.protobuf.Empty) returns (GetSupportedActionsResponse) { option (google.api.http) = { get: "/v2/actions" }; };
}
message GetSupportedActionsResponse { repeated string actions = 1; }
message ExecuteRequest { messages.v1.Session session = 1; string action_id = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title: "ID of action to be executed", description: "ID of action to be executed" }]; }
message ExecuteResponse { oneof payload { google.protobuf.Empty empty = 1; ActivityReply reply = 2; } } message ActivityReply { string session_id = 1; } ...
├── mocks │ ├── camouflage.log │ ├── config.yml │ ├── grpc │ │ ├── mocks │ │ │ ├── action_executor │ │ │ │ └── v1 │ │ │ │ └── ActionExecutor │ │ │ │ ├── Execute.mock │ │ │ │ └── GetSupportedActions.mock │ │ └── protos │ │ └── all.proto │ └── plconfig.js └── third-party └── protoc-gen-openapiv2 └── options ├── annotations.proto └── openapiv2.proto
Error: illegal name ';' (action_executor.proto, line 18)
Expected behavior Files from all includeDirs are loaded properly, custom proto options are recognized
Desktop (please complete the following information):
Additional context