github.com/cbroglie/openapi2proto@v0.0.0-20171004221549-76b8501da882/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 GetPetsIdRequest {
    20      // ID of pet to fetch
    21      int64 id = 1;
    22  }
    23  
    24  message DeletePetsIdRequest {
    25      // ID of pet to delete
    26      int64 id = 1;
    27  }
    28  
    29  message Pet {
    30      int64 id = 1;
    31      string name = 2;
    32      string tag = 3;
    33  }
    34  
    35  message Pets {
    36      repeated Pet pets = 1;
    37  }
    38  
    39  service SwaggerPetstoreService {
    40      // Returns all pets from the system that the user has access to
    41      rpc GetPets(GetPetsRequest) returns (Pets) {}
    42      // Creates a new pet in the store.  Duplicates are allowed
    43      rpc PostPets(PostPetsRequest) returns (Pet) {}
    44      // Returns a user based on a single ID, if the user does not have access to the pet
    45      rpc GetPetsId(GetPetsIdRequest) returns (Pet) {}
    46      // deletes a single pet based on the ID supplied
    47      rpc DeletePetsId(DeletePetsIdRequest) returns (google.protobuf.Empty) {}
    48  }