{ "swagger": "2.0", "info": { "description": "This is a sample server celler server.", "title": "Swagger Example API", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "host": "localhost:8080", "basePath": "/v1/api", "paths": { "/v1/api/admin/login": { "post": { "description": "登录API", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Common" ], "summary": "登录", "parameters": [ { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin_common.Request" } } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/common.UserInfo" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/permission": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Permissions" ], "summary": "新增权限", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/permission.CreateRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/permission/{permissionID}": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Permissions" ], "summary": "获取权限详情", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "权限ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/admin.AdminPermission" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Permissions" ], "summary": "更新权限", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "权限ID", "name": "id", "in": "path", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/permission.UpdateRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Permissions" ], "summary": "删除权限", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "权限ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/permission/{permissionID}/toggle": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Permissions" ], "summary": "启用/禁用", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/permission.ToggleRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/permissions": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Permissions" ], "summary": "权限列表", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "关键字", "name": "keyword", "in": "query" }, { "enum": [ "enabled", "disabled" ], "type": "string", "description": "状态", "name": "status", "in": "query" } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/permission.ListResponse" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/profile": { "get": { "description": "查询个人信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Common" ], "summary": "获取个人信息", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/common.UserInfo" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Common" ], "summary": "退出登录", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/role": { "post": { "description": "创建角色", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Role 角色管理" ], "summary": "新增角色", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin_role.CreateAdminRoleRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/role/labels": { "get": { "description": "获取所有已启用角色列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Role 角色管理" ], "summary": "已启用角色列表", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/admin_role.EnabledRoles" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/role/{roleID}": { "get": { "description": "获取角色详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Role 角色管理" ], "summary": "详情", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "角色ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/admin.RoleItem" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } }, "put": { "description": "更新角色内容", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Role 角色管理" ], "summary": "更新角色", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "角色ID", "name": "id", "in": "path", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin_role.UpdateRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } }, "delete": { "description": "删除角色", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Role 角色管理" ], "summary": "删除", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "角色ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/role/{roleID}/toggle": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Role 角色管理" ], "summary": "启用/禁用", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin_role.ToggleRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/roles": { "get": { "description": "获取角色列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Role 角色管理" ], "summary": "角色列表", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "关键字", "name": "keyword", "in": "query" }, { "enum": [ "enabled", "disabled" ], "type": "string", "description": "状态", "name": "status", "in": "query" } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/admin_role.ListAdminRolesResponse" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/user": { "post": { "description": "创建用户", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User 用户管理" ], "summary": "新增用户", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin_user.UserRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/user/labels": { "get": { "description": "获取所有已启用 用户列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User 用户管理" ], "summary": "已启用 用户列表", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/admin_user.EnabledUserItem" } } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/user/{id}": { "get": { "description": "获取用户详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User 用户管理" ], "summary": "详情", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "角色ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/authorization_client.GetAdminUser" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/user/{userID}": { "put": { "description": "更新用户内容", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User 用户管理" ], "summary": "修改个人信息", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "角色ID", "name": "id", "in": "path", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin_user.UpdateRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } }, "delete": { "description": "删除管理员", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User 用户管理" ], "summary": "删除", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "用户ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/user/{userID}/toggle": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User 用户管理" ], "summary": "启用/禁用", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "description": "请求body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/admin_user.ToggleRequest" } } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } }, "/v1/api/admin/users": { "get": { "description": "获取用户列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User 用户管理" ], "summary": "用户列表", "parameters": [ { "type": "string", "description": "Bearer 用户令牌", "name": "Authorization", "in": "header", "required": true }, { "type": "integer", "description": "页码", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": "每页数量", "name": "page_size", "in": "query", "required": true }, { "type": "string", "description": "关键字", "name": "keyword", "in": "query" }, { "enum": [ "enabled", "disabled" ], "type": "string", "description": "状态", "name": "status", "in": "query" } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/response.ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/admin_user.ListAdminUserResponse" } } } ] } }, "400": { "description": "请求错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } }, "500": { "description": "内部错误", "schema": { "$ref": "#/definitions/response.ApiResponse" } } } } } }, "definitions": { "admin.AdminPermission": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by": { "type": "string" }, "description": { "type": "string" }, "endpoint": { "type": "string" }, "id": { "type": "integer" }, "is_reserved": { "type": "boolean" }, "name": { "type": "string" }, "roles": { "type": "array", "items": { "$ref": "#/definitions/base.ListMapItem" } }, "status": { "description": "可以是 \"enabled\", \"disabled\", \"deleted\" 等", "type": "string" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" } } }, "admin.RoleItem": { "type": "object", "properties": { "created_at": { "description": "创建时间", "type": "string" }, "created_by": { "description": "创建人", "type": "string" }, "description": { "description": "描述", "type": "string" }, "id": { "type": "integer" }, "is_reserved": { "description": "是否可操作", "type": "boolean" }, "name": { "description": "名称", "type": "string" }, "permissions": { "description": "权限", "type": "array", "items": { "$ref": "#/definitions/base.ListMapItem" } }, "status": { "description": "\"enabled\", \"disabled\"", "type": "string" }, "updated_at": { "description": "更新时间", "type": "string" }, "users": { "description": "关联用户", "type": "array", "items": { "$ref": "#/definitions/base.ListMapItem" } } } }, "admin.UserItem": { "type": "object", "properties": { "avatar": { "description": "头像", "type": "string" }, "created_at": { "description": "创建时间", "type": "string" }, "email": { "description": "邮箱", "type": "string" }, "id": { "type": "integer" }, "is_reserved": { "type": "boolean" }, "name": { "description": "名称", "type": "string" }, "phone_number": { "description": "手机号", "type": "string" }, "roles": { "description": "角色", "type": "array", "items": { "$ref": "#/definitions/base.ListMapItem" } }, "status": { "description": "状态 \"enabled\"|\"disabled\"", "allOf": [ { "$ref": "#/definitions/base.Status" } ] }, "teams": { "description": "团队", "type": "array", "items": { "$ref": "#/definitions/base.ListMapItem" } }, "updated_at": { "description": "更新时间", "type": "string" } } }, "admin_common.Request": { "type": "object", "required": [ "password", "username" ], "properties": { "password": { "description": "密码", "type": "string", "maxLength": 18, "minLength": 6 }, "username": { "description": "用户名", "type": "string", "maxLength": 15, "minLength": 5 } } }, "admin_role.CreateAdminRoleRequest": { "type": "object", "required": [ "name" ], "properties": { "description": { "description": "非必填,描述", "type": "string" }, "name": { "description": "角色名称", "type": "string", "maxLength": 15, "minLength": 3 }, "permissions": { "description": "权限", "type": "array", "items": { "type": "integer" } }, "users": { "description": "管理员", "type": "array", "items": { "type": "integer" } } } }, "admin_role.EnabledRoleItem": { "type": "object", "properties": { "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "admin_role.EnabledRoles": { "type": "object", "properties": { "roles": { "type": "array", "items": { "$ref": "#/definitions/admin_role.EnabledRoleItem" } } } }, "admin_role.ListAdminRolesResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/admin.RoleItem" } }, "total_count": { "type": "integer" } } }, "admin_role.ToggleRequest": { "type": "object", "required": [ "status" ], "properties": { "status": { "description": "\"enabled\"|\"disabled\"", "allOf": [ { "$ref": "#/definitions/base.Status" } ] } } }, "admin_role.UpdateRequest": { "type": "object", "properties": { "description": { "description": "非必填,描述", "type": "string" }, "permissions": { "description": "权限", "type": "array", "items": { "type": "integer" } }, "users": { "description": "管理员", "type": "array", "items": { "type": "integer" } } } }, "admin_user.EnabledUserItem": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "admin_user.ListAdminUserResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/admin.UserItem" } }, "total_count": { "type": "integer" } } }, "admin_user.ToggleRequest": { "type": "object", "required": [ "status" ], "properties": { "status": { "description": "\"enabled\"|\"disabled\"", "allOf": [ { "$ref": "#/definitions/base.Status" } ] } } }, "admin_user.UpdateRequest": { "type": "object", "required": [ "email", "phone_number" ], "properties": { "avatar": { "description": "头像", "type": "string" }, "email": { "description": "邮箱", "type": "string" }, "phone_number": { "description": "手机号", "type": "string" }, "roles": { "description": "角色ID", "type": "array", "items": { "type": "integer" } }, "teams": { "description": "团队ID", "type": "array", "items": { "type": "integer" } } } }, "admin_user.UserRequest": { "type": "object", "required": [ "password", "phone_number", "username" ], "properties": { "avatar": { "description": "头像", "type": "string" }, "email": { "description": "邮箱", "type": "string" }, "password": { "description": "密码", "type": "string", "maxLength": 18, "minLength": 6 }, "phone_number": { "description": "手机号", "type": "string" }, "roles": { "description": "角色ID", "type": "array", "items": { "type": "integer" } }, "teams": { "description": "团队ID", "type": "array", "items": { "type": "integer" } }, "username": { "description": "用户名", "type": "string", "maxLength": 15, "minLength": 5 } } }, "authorization_client.AdminUserBase": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "authorization_client.AdminUserProfile": { "type": "object", "properties": { "address": { "type": "string" }, "avatar": { "type": "string" }, "bio": { "type": "string" }, "birthdate": { "type": "integer" }, "educations": { "type": "array", "items": { "$ref": "#/definitions/authorization_client.AdminUserProfileEducation" } }, "email": { "type": "string" }, "gender": { "type": "integer" }, "phone_number": { "type": "string" }, "social_links": { "type": "array", "items": { "$ref": "#/definitions/authorization_client.AdminUserProfileSocialLink" } }, "website": { "type": "string" }, "work_histories": { "type": "array", "items": { "$ref": "#/definitions/authorization_client.AdminUserProfileWorkHistory" } } } }, "authorization_client.AdminUserProfileEducation": { "type": "object", "properties": { "degree": { "type": "string" }, "graduated": { "type": "integer" }, "school": { "type": "string" } } }, "authorization_client.AdminUserProfileSocialLink": { "type": "object", "properties": { "platform": { "type": "string" }, "url": { "type": "string" } } }, "authorization_client.AdminUserProfileWorkHistory": { "type": "object", "properties": { "company": { "type": "string" }, "end_date": { "type": "integer" }, "position": { "type": "string" }, "responsibilities": { "type": "string" }, "start_date": { "type": "integer" } } }, "authorization_client.GetAdminUser": { "type": "object", "properties": { "profile": { "$ref": "#/definitions/authorization_client.AdminUserProfile" }, "roles": { "type": "array", "items": { "$ref": "#/definitions/authorization_client.AdminUserBase" } }, "status": { "type": "string" }, "teams": { "type": "array", "items": { "$ref": "#/definitions/authorization_client.AdminUserBase" } }, "user_id": { "type": "integer" }, "username": { "type": "string" } } }, "base.ListMapItem": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "base.Status": { "type": "string", "enum": [ "ENABLED", "DISABLED", "DELETED" ], "x-enum-varnames": [ "ToggleEnabled", "ToggleDisabled", "ToggleDeleted" ] }, "common.UserInfo": { "type": "object", "properties": { "avatar": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "integer" }, "phone_number": { "type": "string" }, "roles": { "type": "array", "items": { "$ref": "#/definitions/base.ListMapItem" } }, "teams": { "type": "array", "items": { "$ref": "#/definitions/base.ListMapItem" } }, "username": { "type": "string" } } }, "permission.CreateRequest": { "type": "object", "required": [ "endpoint", "name" ], "properties": { "description": { "description": "非必填,描述", "type": "string" }, "endpoint": { "type": "string" }, "name": { "description": "权限名称", "type": "string", "maxLength": 50, "minLength": 3 }, "roles": { "description": "角色", "type": "array", "items": { "type": "integer" } } } }, "permission.ListResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/admin.AdminPermission" } }, "total_count": { "type": "integer" } } }, "permission.ToggleRequest": { "type": "object", "required": [ "status" ], "properties": { "status": { "description": "\"enabled\"|\"disabled\"", "allOf": [ { "$ref": "#/definitions/base.Status" } ] } } }, "permission.UpdateRequest": { "type": "object", "properties": { "description": { "description": "非必填,描述", "type": "string" }, "roles": { "description": "角色", "type": "array", "items": { "type": "integer" } } } }, "response.ApiResponse": { "type": "object", "properties": { "code": { "type": "integer" }, "data": {}, "message": { "type": "string" } } } }, "securityDefinitions": { "BasicAuth": { "type": "basic" } }, "externalDocs": { "description": "OpenAPI", "url": "https://swagger.io/resources/open-api/" } }