forked from loafle/openapi-generator-original
103 lines
2.0 KiB
Protocol Buffer
103 lines
2.0 KiB
Protocol Buffer
/*
|
|
OpenAPI Petstore
|
|
|
|
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
|
|
The version of the OpenAPI document: 1.0.0
|
|
|
|
Generated by OpenAPI Generator: https://openapi-generator.tech
|
|
*/
|
|
|
|
syntax = "proto3";
|
|
|
|
package petstore.services.petservice;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import public "models/api_response.proto";
|
|
import public "models/pet.proto";
|
|
|
|
service PetService {
|
|
rpc AddPet (AddPetRequest) returns (Pet);
|
|
|
|
rpc DeletePet (DeletePetRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc FindPetsByStatus (FindPetsByStatusRequest) returns (FindPetsByStatusResponse);
|
|
|
|
rpc FindPetsByTags (FindPetsByTagsRequest) returns (FindPetsByTagsResponse);
|
|
|
|
rpc GetPetById (GetPetByIdRequest) returns (Pet);
|
|
|
|
rpc UpdatePet (UpdatePetRequest) returns (Pet);
|
|
|
|
rpc UpdatePetWithForm (UpdatePetWithFormRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc UploadFile (UploadFileRequest) returns (ApiResponse);
|
|
|
|
}
|
|
|
|
message AddPetRequest {
|
|
// Pet object that needs to be added to the store
|
|
Pet pet = 1;
|
|
|
|
}
|
|
|
|
message DeletePetRequest {
|
|
// Pet id to delete
|
|
int64 petId = 1;
|
|
string apiKey = 2;
|
|
|
|
}
|
|
|
|
message FindPetsByStatusRequest {
|
|
// Status values that need to be considered for filter
|
|
repeated string status = 1;
|
|
|
|
}
|
|
|
|
message FindPetsByStatusResponse {
|
|
repeated Pet data = 1;
|
|
}
|
|
|
|
message FindPetsByTagsRequest {
|
|
// Tags to filter by
|
|
repeated string tags = 1;
|
|
|
|
}
|
|
|
|
message FindPetsByTagsResponse {
|
|
repeated Pet data = 1;
|
|
}
|
|
|
|
message GetPetByIdRequest {
|
|
// ID of pet to return
|
|
int64 petId = 1;
|
|
|
|
}
|
|
|
|
message UpdatePetRequest {
|
|
// Pet object that needs to be added to the store
|
|
Pet pet = 1;
|
|
|
|
}
|
|
|
|
message UpdatePetWithFormRequest {
|
|
// ID of pet that needs to be updated
|
|
int64 petId = 1;
|
|
// Updated name of the pet
|
|
string name = 2;
|
|
// Updated status of the pet
|
|
string status = 3;
|
|
|
|
}
|
|
|
|
message UploadFileRequest {
|
|
// ID of pet to update
|
|
int64 petId = 1;
|
|
// Additional data to pass to server
|
|
string additionalMetadata = 2;
|
|
// file to upload
|
|
string file = 3;
|
|
|
|
}
|
|
|