1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
syntax = "proto3";
package grpc.gateway.examples.internal.proto.examplepb;
import "google/api/annotations.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
// This comment should be excluded from OpenAPI output
service FooService {
// This comment should be excluded from OpenAPI output
rpc Foo(FooRequest) returns (FooReply) {
option (google.api.http) = {
post: "/v1/example/foo"
body: "*"
};
}
}
// This comment should be excluded from OpenAPI output
message FooRequest {
// This comment should be excluded from OpenAPI output
string username = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "This annotation should be preserved"}];
// This comment should be excluded from OpenAPI output
string password = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "This annotation should be preserved"}];
}
// This comment should be excluded from OpenAPI output
message FooReply {}
|