user-base/gen/proto/user.swagger.json

293 lines
6.5 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "proto/user.proto",
"version": "version not set"
},
"tags": [
{
"name": "UserService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/user": {
"get": {
"summary": "用户列表",
"operationId": "UserService_ListUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userListUserResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "page",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "pageSize",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"UserService"
]
},
"delete": {
"summary": "删除用户信息",
"operationId": "UserService_DeleteUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userDeleteUserResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"UserService"
]
}
},
"/v1/user/login": {
"post": {
"summary": "用户登录",
"operationId": "UserService_Login",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userLoginResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userLoginRequest"
}
}
],
"tags": [
"UserService"
]
}
},
"/v1/user/register": {
"post": {
"summary": "用户注册",
"operationId": "UserService_Register",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userRegisterResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/userRegisterRequest"
}
}
],
"tags": [
"UserService"
]
}
},
"/v1/user/update": {
"put": {
"summary": "更新用户信息",
"operationId": "UserService_UpdateUserInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userUpdateUserInfoResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"UserService"
]
}
},
"/v1/user/{id}": {
"get": {
"summary": "获取用户信息",
"operationId": "UserService_GetUserInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/userGetUserInfoResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"UserService"
]
}
}
},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"userDeleteUserResponse": {
"type": "object"
},
"userGetUserInfoResponse": {
"type": "object"
},
"userListUserResponse": {
"type": "object"
},
"userLoginRequest": {
"type": "object",
"properties": {
"Code": {
"type": "string"
}
},
"title": "扫码登录"
},
"userLoginResponse": {
"type": "object",
"properties": {
"Token": {
"type": "string"
},
"Orgid": {
"type": "string"
}
}
},
"userRegisterRequest": {
"type": "object",
"properties": {
"UserName": {
"type": "string"
},
"Avatar": {
"type": "string"
}
}
},
"userRegisterResponse": {
"type": "object"
},
"userUpdateUserInfoResponse": {
"type": "object"
}
}
}