Tomáš Čermák 9b65513bb1
[Protobuf-Schema] Namespace updates (#11115)
* [Protobuf-Schema] Namespace updates

* [Protobuf-Schema] Petstore sample updated
2021-12-17 10:12:11 +08:00

87 lines
1.8 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.userservice;
import "google/protobuf/empty.proto";
import public "models/user.proto";
service UserService {
rpc CreateUser (CreateUserRequest) returns (google.protobuf.Empty);
rpc CreateUsersWithArrayInput (CreateUsersWithArrayInputRequest) returns (google.protobuf.Empty);
rpc CreateUsersWithListInput (CreateUsersWithListInputRequest) returns (google.protobuf.Empty);
rpc DeleteUser (DeleteUserRequest) returns (google.protobuf.Empty);
rpc GetUserByName (GetUserByNameRequest) returns (User);
rpc LoginUser (LoginUserRequest) returns (LoginUserResponse);
rpc LogoutUser (google.protobuf.Empty) returns (google.protobuf.Empty);
rpc UpdateUser (UpdateUserRequest) returns (google.protobuf.Empty);
}
message CreateUserRequest {
// Created user object
User user = 1;
}
message CreateUsersWithArrayInputRequest {
// List of user object
repeated User user = 1;
}
message CreateUsersWithListInputRequest {
// List of user object
repeated User user = 1;
}
message DeleteUserRequest {
// The name that needs to be deleted
string username = 1;
}
message GetUserByNameRequest {
// The name that needs to be fetched. Use user1 for testing.
string username = 1;
}
message LoginUserRequest {
// The user name for login
string username = 1;
// The password for login in clear text
string password = 2;
}
message LoginUserResponse {
string data = 1;
}
message UpdateUserRequest {
// name that need to be deleted
string username = 1;
// Updated user object
User user = 2;
}