github.com/chrusty/openapi2proto@v0.0.0-20171127225041-f5804f48ccdb/fixtures/petstore/swagger.proto (about)

     1  syntax = "proto3";
     2  
     3  import "google/protobuf/empty.proto";
     4  
     5  package swaggerpetstore;
     6  
     7  message GetPetsRequest {
     8      // maximum number of results to return
     9      int32 limit = 1;
    10      // tags to filter by
    11      repeated string tags = 2;
    12  }
    13  
    14  message PostPetsRequest {
    15      // Pet to add to the store
    16      Pet pet = 1;
    17  }
    18  
    19  message GetPetsIdsRequest {
    20      repeated string ids = 1;
    21      // maximum number of results to return
    22      int32 limit = 2;
    23  }
    24  
    25  message GetPetsIdRequest {
    26      // ID of pet to fetch
    27      int64 id = 1;
    28  }
    29  
    30  message DeletePetsIdRequest {
    31      // ID of pet to delete
    32      int64 id = 1;
    33  }
    34  
    35  message Pet {
    36      int64 id = 1;
    37      string name = 2;
    38      string tag = 3;
    39  }
    40  
    41  message Pets {
    42      repeated Pet pets = 1;
    43  }
    44  
    45  service SwaggerPetstoreService {
    46      // Returns all pets from the system that the user has access to
    47      rpc GetPets(GetPetsRequest) returns (Pets) {}
    48      // Creates a new pet in the store.  Duplicates are allowed
    49      rpc PostPets(PostPetsRequest) returns (Pet) {}
    50      // Returns all pets from the system that the user has access to
    51      rpc GetPetsIds(GetPetsIdsRequest) returns (Pets) {}
    52      // Returns a user based on a single ID, if the user does not have access to the pet
    53      rpc GetPetsId(GetPetsIdRequest) returns (Pet) {}
    54      // deletes a single pet based on the ID supplied
    55      rpc DeletePetsId(DeletePetsIdRequest) returns (google.protobuf.Empty) {}
    56  }