849 lines
26 KiB
JSON
849 lines
26 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"contact": {}
|
|
},
|
|
"paths": {
|
|
"/api/auth/role/add_role_to_user": {
|
|
"post": {
|
|
"description": "给指定用户添加角色",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"角色"
|
|
],
|
|
"summary": "给指定用户添加角色",
|
|
"parameters": [
|
|
{
|
|
"description": "给指定用户添加角色",
|
|
"name": "addRoleToUserRequestDto",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.AddRoleToUserRequestDto"
|
|
}
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/auth/role/create": {
|
|
"post": {
|
|
"description": "创建角色",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"角色"
|
|
],
|
|
"summary": "创建角色",
|
|
"parameters": [
|
|
{
|
|
"description": "角色信息",
|
|
"name": "roleRequestDto",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.RoleRequestDto"
|
|
}
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/auth/user/List": {
|
|
"get": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "获取所有用户列表",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/user/delete": {
|
|
"delete": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "删除用户",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "用户uuid",
|
|
"name": "uuid",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/user/query_by_phone": {
|
|
"get": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "根据手机号查询用户",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "手机号",
|
|
"name": "phone",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/user/query_by_username": {
|
|
"get": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "根据用户名查询用户",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "用户名",
|
|
"name": "username",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/user/query_by_uuid": {
|
|
"get": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "根据uuid查询用户",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "用户uuid",
|
|
"name": "uuid",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/rotate/check": {
|
|
"post": {
|
|
"description": "验证旋转验证码",
|
|
"tags": [
|
|
"旋转验证码"
|
|
],
|
|
"summary": "验证旋转验证码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "验证码角度",
|
|
"name": "angle",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "验证码key",
|
|
"name": "key",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/rotate/get": {
|
|
"get": {
|
|
"description": "生成旋转验证码",
|
|
"tags": [
|
|
"旋转验证码"
|
|
],
|
|
"summary": "生成旋转验证码",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/shape/check": {
|
|
"get": {
|
|
"description": "生成点击形状基础验证码",
|
|
"tags": [
|
|
"点击形状验证码"
|
|
],
|
|
"summary": "生成点击形状基础验证码",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/shape/get": {
|
|
"get": {
|
|
"description": "生成点击形状验证码",
|
|
"tags": [
|
|
"点击形状验证码"
|
|
],
|
|
"summary": "生成点击形状验证码",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/shape/slide/check": {
|
|
"get": {
|
|
"description": "验证点击形状验证码",
|
|
"tags": [
|
|
"点击形状验证码"
|
|
],
|
|
"summary": "验证点击形状验证码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "点击坐标",
|
|
"name": "point",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "验证码key",
|
|
"name": "key",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/shape/slide/region/get": {
|
|
"get": {
|
|
"description": "生成点击形状验证码",
|
|
"tags": [
|
|
"点击形状验证码"
|
|
],
|
|
"summary": "生成点击形状验证码",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/text/check": {
|
|
"get": {
|
|
"description": "验证基础文字验证码",
|
|
"tags": [
|
|
"基础文字验证码"
|
|
],
|
|
"summary": "验证基础文字验证码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "验证码",
|
|
"name": "captcha",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "验证码key",
|
|
"name": "key",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/captcha/text/get": {
|
|
"get": {
|
|
"description": "生成基础文字验证码",
|
|
"tags": [
|
|
"基础文字验证码"
|
|
],
|
|
"summary": "生成基础文字验证码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "验证码类型",
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/oauth/callback_notify": {
|
|
"post": {
|
|
"description": "微信回调",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"微信公众号"
|
|
],
|
|
"summary": "微信回调",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/oauth/callback_verify": {
|
|
"get": {
|
|
"description": "微信回调验证",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"微信公众号"
|
|
],
|
|
"summary": "微信回调验证",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/oauth/generate_client_id": {
|
|
"get": {
|
|
"description": "生成客户端ID",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"微信公众号"
|
|
],
|
|
"summary": "生成客户端ID",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/oauth/get_temp_qrcode": {
|
|
"get": {
|
|
"description": "获取临时二维码",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"微信公众号"
|
|
],
|
|
"summary": "获取临时二维码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "客户端ID",
|
|
"name": "client_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/oauth/gitee/callback": {
|
|
"get": {
|
|
"description": "处理Gitee回调",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Gitee OAuth"
|
|
],
|
|
"summary": "处理Gitee回调",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/oauth/gitee/get_url": {
|
|
"get": {
|
|
"description": "获取Gitee登录地址",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Gitee OAuth"
|
|
],
|
|
"summary": "获取Gitee登录地址",
|
|
"responses": {
|
|
"200": {
|
|
"description": "登录地址",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/oauth/github/callback": {
|
|
"get": {
|
|
"description": "登录回调函数",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Github OAuth"
|
|
],
|
|
"summary": "登录回调函数",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "code",
|
|
"name": "code",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "登录成功",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/oauth/github/get_url": {
|
|
"get": {
|
|
"description": "获取github登录url",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Github OAuth"
|
|
],
|
|
"summary": "获取github登录url",
|
|
"responses": {
|
|
"200": {
|
|
"description": "登录url",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/oauth/qq/callback": {
|
|
"get": {
|
|
"description": "QQ登录回调",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"QQ OAuth"
|
|
],
|
|
"summary": "QQ登录回调",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/oauth/qq/get_url": {
|
|
"get": {
|
|
"description": "获取QQ登录地址",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"QQ OAuth"
|
|
],
|
|
"summary": "获取QQ登录地址",
|
|
"responses": {
|
|
"200": {
|
|
"description": "登录地址",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/sms/ali/send": {
|
|
"get": {
|
|
"description": "发送短信验证码",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"短信验证码"
|
|
],
|
|
"summary": "发送短信验证码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "手机号",
|
|
"name": "phone",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/sms/smsbao/send": {
|
|
"get": {
|
|
"description": "短信宝发送短信验证码",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"短信验证码"
|
|
],
|
|
"summary": "短信宝发送短信验证码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "手机号",
|
|
"name": "phone",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/sms/test/send": {
|
|
"get": {
|
|
"description": "发送测试短信验证码",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"短信验证码"
|
|
],
|
|
"summary": "发送测试短信验证码",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "手机号",
|
|
"name": "phone",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/token/refresh": {
|
|
"post": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "刷新token",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "刷新token",
|
|
"name": "refresh_token",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/user/add": {
|
|
"post": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "添加用户",
|
|
"parameters": [
|
|
{
|
|
"description": "用户信息",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.AddUserRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/user/login": {
|
|
"post": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "账号登录",
|
|
"parameters": [
|
|
{
|
|
"description": "用户信息",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.AccountLoginRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/user/phone_login": {
|
|
"post": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "手机号登录/注册",
|
|
"parameters": [
|
|
{
|
|
"description": "用户信息",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.PhoneLoginRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/user/reset_password": {
|
|
"post": {
|
|
"tags": [
|
|
"用户模块"
|
|
],
|
|
"summary": "重置密码",
|
|
"parameters": [
|
|
{
|
|
"description": "用户信息",
|
|
"name": "user",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.ResetPasswordRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/ws/gws": {
|
|
"get": {
|
|
"description": "创建websocket服务",
|
|
"tags": [
|
|
"websocket"
|
|
],
|
|
"summary": "创建websocket服务",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/ws/socket": {
|
|
"get": {
|
|
"description": "创建websocket服务",
|
|
"tags": [
|
|
"websocket"
|
|
],
|
|
"summary": "创建websocket服务(gorilla)",
|
|
"responses": {}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"dto.AccountLoginRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"auto_login": {
|
|
"type": "boolean"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.AddRoleToUserRequestDto": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role_key": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.AddUserRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.PhoneLoginRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auto_login": {
|
|
"type": "boolean"
|
|
},
|
|
"captcha": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.ResetPasswordRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"captcha": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"repassword": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.RoleRequestDto": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role_key": {
|
|
"type": "string"
|
|
},
|
|
"role_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |