-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
📚 Documentation
(A clear and concise description of what the issue is.)
I have a rpc method like below, it supports both PUT and PATCH calls. I want to customize the operationId, like below. but the result is there is a repeated operateId in the generated apidocs.swagger.json.
How do I define these two operateIds separately?
// Update updates a function.
rpc Update(UpdateFunctionRequest) returns (Function) {
option (google.api.http) = {
put: "/api/v1/functions/{id}"
body: "function"
additional_bindings: {
patch: "/api/v1/functions/{id}"
body: "*"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {operation_id: "updateFunction"};
}PS: Duplicate ids will cause failure in client generation
Errors:
-attribute paths.'/api/v1/functions/{id}'(patch).operationId is repeated
at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:620)
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:647)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:479)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)Metadata
Metadata
Assignees
Labels
No labels
