github.com/grpc-ecosystem/grpc-gateway/v2@v2.19.1/examples/internal/proto/examplepb/openapi_merge_b.proto (about)

     1  syntax = "proto3";
     2  
     3  // Merging Services
     4  //
     5  // This is an example of merging two proto files.
     6  package grpc.gateway.examples.internal.examplepb;
     7  
     8  import "google/api/annotations.proto";
     9  
    10  option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
    11  
    12  // InMessageB represents a message to ServiceB.
    13  message InMessageB {
    14    // Here is the explanation about InMessageB.values
    15    string value = 1;
    16  }
    17  
    18  // OutMessageB represents a message returned from ServiceB.
    19  message OutMessageB {
    20    // Here is the explanation about OutMessageB.value
    21    repeated string values = 1;
    22  }
    23  
    24  // ServiceB service responds to incoming merge requests.
    25  service ServiceB {
    26    // ServiceB.MethodOne receives InMessageB and returns OutMessageB
    27    //
    28    // Here is the detail explanation about ServiceB.MethodOne.
    29    rpc MethodOne(InMessageB) returns (OutMessageB) {
    30      option (google.api.http) = {
    31        post: "/v1/example/b/1"
    32        body: "*"
    33      };
    34    }
    35    // ServiceB.MethodTwo receives OutMessageB and returns InMessageB
    36    //
    37    // Here is the detail explanation about ServiceB.MethodTwo.
    38    rpc MethodTwo(OutMessageB) returns (InMessageB) {
    39      option (google.api.http) = {
    40        post: "/v1/example/b/2"
    41        body: "*"
    42      };
    43    }
    44  }