Browse Source

文档修改

main
pixel 5 years ago
parent
commit
bec140ae58
  1. 439
      QMPlusServer/docs/docs.go
  2. 437
      QMPlusServer/docs/swagger.json
  3. 272
      QMPlusServer/docs/swagger.yaml

439
QMPlusServer/docs/docs.go

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at // This file was generated by swaggo/swag at
// 2019-09-08 16:14:12.6903257 +0800 CST m=+0.106563301
// 2019-09-21 22:57:49.3172136 +0800 CST m=+0.048845201
package docs package docs
@ -104,6 +104,84 @@ var doc = `{
} }
} }
}, },
"/api/getApiList": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"api"
],
"summary": "分页获取角色列表",
"parameters": [
{
"description": "分页获取用户列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/api/setAuthAndPath": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Api"
],
"summary": "创建api和角色关系",
"parameters": [
{
"description": "创建api和角色关系",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.AuthAndPathIn"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/authority/createAuthority": { "/authority/createAuthority": {
"post": { "post": {
"security": [ "security": [
@ -182,6 +260,45 @@ var doc = `{
} }
} }
}, },
"/authority/getAuthorityList": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"authority"
],
"summary": "分页获取角色列表",
"parameters": [
{
"description": "分页获取用户列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/base/login": { "/base/login": {
"post": { "post": {
"produces": [ "produces": [
@ -244,6 +361,234 @@ var doc = `{
} }
} }
}, },
"/menu/addBaseMenu": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"menu"
],
"summary": "分页获取基础menu列表",
"parameters": [
{
"description": "分页获取基础menu列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/addMenuAuthority": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"authorityAndMenu"
],
"summary": "获取指定角色menu",
"parameters": [
{
"description": "增加menu和角色关联关系",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.AuthorityIdInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/deleteBaseMenu": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"menu"
],
"summary": "获取指定角色menu",
"parameters": [
{
"description": "删除菜单",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.IdInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/getBaseMenuTree": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"authorityAndMenu"
],
"summary": "获取用户动态路由",
"parameters": [
{
"description": "可以什么都不填",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/getMenu": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"authorityAndMenu"
],
"summary": "获取用户动态路由",
"parameters": [
{
"description": "可以什么都不填",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/getMenuList": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"menu"
],
"summary": "分页获取基础menu列表",
"parameters": [
{
"description": "分页获取基础menu列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/changePassword": { "/user/changePassword": {
"post": { "post": {
"security": [ "security": [
@ -364,6 +709,42 @@ var doc = `{
} }
}, },
"definitions": { "definitions": {
"api.AddMenuAuthorityInfo": {
"type": "object",
"properties": {
"authorityId": {
"type": "string"
},
"menus": {
"type": "array",
"items": {
"$ref": "#/definitions/dbModel.BaseMenu"
}
}
}
},
"api.AuthAndPathIn": {
"type": "object",
"properties": {
"apis": {
"type": "array",
"items": {
"$ref": "#/definitions/dbModel.Api"
}
},
"authorityId": {
"type": "string"
}
}
},
"api.AuthorityIdInfo": {
"type": "object",
"properties": {
"authorityId": {
"type": "string"
}
}
},
"api.ChangePasswordStutrc": { "api.ChangePasswordStutrc": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -393,7 +774,7 @@ var doc = `{
"type": "object", "type": "object",
"properties": { "properties": {
"authorityId": { "authorityId": {
"type": "integer"
"type": "string"
}, },
"authorityName": { "authorityName": {
"type": "string" "type": "string"
@ -411,6 +792,14 @@ var doc = `{
} }
} }
}, },
"api.IdInfo": {
"type": "object",
"properties": {
"id": {
"type": "number"
}
}
},
"api.RegistAndLoginStuct": { "api.RegistAndLoginStuct": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -422,6 +811,52 @@ var doc = `{
} }
} }
}, },
"dbModel.Api": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"dbModel.BaseMenu": {
"type": "object",
"properties": {
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/dbModel.BaseMenu"
}
},
"component": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"name": {
"type": "string"
},
"nickName": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"modelInterface.PageInfo": { "modelInterface.PageInfo": {
"type": "object", "type": "object",
"properties": { "properties": {

437
QMPlusServer/docs/swagger.json

@ -87,6 +87,84 @@
} }
} }
}, },
"/api/getApiList": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"api"
],
"summary": "分页获取角色列表",
"parameters": [
{
"description": "分页获取用户列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/api/setAuthAndPath": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Api"
],
"summary": "创建api和角色关系",
"parameters": [
{
"description": "创建api和角色关系",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.AuthAndPathIn"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/authority/createAuthority": { "/authority/createAuthority": {
"post": { "post": {
"security": [ "security": [
@ -165,6 +243,45 @@
} }
} }
}, },
"/authority/getAuthorityList": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"authority"
],
"summary": "分页获取角色列表",
"parameters": [
{
"description": "分页获取用户列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/base/login": { "/base/login": {
"post": { "post": {
"produces": [ "produces": [
@ -227,6 +344,234 @@
} }
} }
}, },
"/menu/addBaseMenu": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"menu"
],
"summary": "分页获取基础menu列表",
"parameters": [
{
"description": "分页获取基础menu列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/addMenuAuthority": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"authorityAndMenu"
],
"summary": "获取指定角色menu",
"parameters": [
{
"description": "增加menu和角色关联关系",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.AuthorityIdInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/deleteBaseMenu": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"menu"
],
"summary": "获取指定角色menu",
"parameters": [
{
"description": "删除菜单",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.IdInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/getBaseMenuTree": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"authorityAndMenu"
],
"summary": "获取用户动态路由",
"parameters": [
{
"description": "可以什么都不填",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/getMenu": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"authorityAndMenu"
],
"summary": "获取用户动态路由",
"parameters": [
{
"description": "可以什么都不填",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/getMenuList": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"menu"
],
"summary": "分页获取基础menu列表",
"parameters": [
{
"description": "分页获取基础menu列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/modelInterface.PageInfo"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/changePassword": { "/user/changePassword": {
"post": { "post": {
"security": [ "security": [
@ -347,6 +692,42 @@
} }
}, },
"definitions": { "definitions": {
"api.AddMenuAuthorityInfo": {
"type": "object",
"properties": {
"authorityId": {
"type": "string"
},
"menus": {
"type": "array",
"items": {
"$ref": "#/definitions/dbModel.BaseMenu"
}
}
}
},
"api.AuthAndPathIn": {
"type": "object",
"properties": {
"apis": {
"type": "array",
"items": {
"$ref": "#/definitions/dbModel.Api"
}
},
"authorityId": {
"type": "string"
}
}
},
"api.AuthorityIdInfo": {
"type": "object",
"properties": {
"authorityId": {
"type": "string"
}
}
},
"api.ChangePasswordStutrc": { "api.ChangePasswordStutrc": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -376,7 +757,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"authorityId": { "authorityId": {
"type": "integer"
"type": "string"
}, },
"authorityName": { "authorityName": {
"type": "string" "type": "string"
@ -394,6 +775,14 @@
} }
} }
}, },
"api.IdInfo": {
"type": "object",
"properties": {
"id": {
"type": "number"
}
}
},
"api.RegistAndLoginStuct": { "api.RegistAndLoginStuct": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -405,6 +794,52 @@
} }
} }
}, },
"dbModel.Api": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"dbModel.BaseMenu": {
"type": "object",
"properties": {
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/dbModel.BaseMenu"
}
},
"component": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"name": {
"type": "string"
},
"nickName": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"modelInterface.PageInfo": { "modelInterface.PageInfo": {
"type": "object", "type": "object",
"properties": { "properties": {

272
QMPlusServer/docs/swagger.yaml

@ -1,5 +1,28 @@
basePath: / basePath: /
definitions: definitions:
api.AddMenuAuthorityInfo:
properties:
authorityId:
type: string
menus:
items:
$ref: '#/definitions/dbModel.BaseMenu'
type: array
type: object
api.AuthAndPathIn:
properties:
apis:
items:
$ref: '#/definitions/dbModel.Api'
type: array
authorityId:
type: string
type: object
api.AuthorityIdInfo:
properties:
authorityId:
type: string
type: object
api.ChangePasswordStutrc: api.ChangePasswordStutrc:
properties: properties:
newPassword: newPassword:
@ -19,7 +42,7 @@ definitions:
api.CreateAuthorityPatams: api.CreateAuthorityPatams:
properties: properties:
authorityId: authorityId:
type: integer
type: string
authorityName: authorityName:
type: string type: string
type: object type: object
@ -30,6 +53,11 @@ definitions:
authorityId: authorityId:
type: integer type: integer
type: object type: object
api.IdInfo:
properties:
id:
type: number
type: object
api.RegistAndLoginStuct: api.RegistAndLoginStuct:
properties: properties:
password: password:
@ -37,6 +65,36 @@ definitions:
username: username:
type: string type: string
type: object type: object
dbModel.Api:
properties:
description:
type: string
path:
type: string
type: object
dbModel.BaseMenu:
properties:
children:
items:
$ref: '#/definitions/dbModel.BaseMenu'
type: array
component:
type: string
hidden:
type: boolean
icon:
type: string
name:
type: string
nickName:
type: string
parentId:
type: string
path:
type: string
title:
type: string
type: object
modelInterface.PageInfo: modelInterface.PageInfo:
properties: properties:
page: page:
@ -99,6 +157,54 @@ paths:
summary: 删除指定角色api summary: 删除指定角色api
tags: tags:
- Api - Api
/api/getApiList:
post:
consumes:
- application/json
parameters:
- description: 分页获取用户列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/modelInterface.PageInfo'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 分页获取角色列表
tags:
- api
/api/setAuthAndPath:
post:
consumes:
- application/json
parameters:
- description: 创建api和角色关系
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.AuthAndPathIn'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 创建api和角色关系
tags:
- Api
/authority/createAuthority: /authority/createAuthority:
post: post:
consumes: consumes:
@ -147,6 +253,30 @@ paths:
summary: 删除角色 summary: 删除角色
tags: tags:
- authority - authority
/authority/getAuthorityList:
post:
consumes:
- application/json
parameters:
- description: 分页获取用户列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/modelInterface.PageInfo'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 分页获取角色列表
tags:
- authority
/base/login: /base/login:
post: post:
parameters: parameters:
@ -187,6 +317,146 @@ paths:
summary: 用户注册账号 summary: 用户注册账号
tags: tags:
- Base - Base
/menu/addBaseMenu:
post:
consumes:
- application/json
parameters:
- description: 分页获取基础menu列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/modelInterface.PageInfo'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 分页获取基础menu列表
tags:
- menu
/menu/addMenuAuthority:
post:
consumes:
- application/json
parameters:
- description: 增加menu和角色关联关系
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.AuthorityIdInfo'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 获取指定角色menu
tags:
- authorityAndMenu
/menu/deleteBaseMenu:
post:
consumes:
- application/json
parameters:
- description: 删除菜单
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.IdInfo'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 获取指定角色menu
tags:
- menu
/menu/getBaseMenuTree:
post:
parameters:
- description: 可以什么都不填
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.RegistAndLoginStuct'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"返回成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 获取用户动态路由
tags:
- authorityAndMenu
/menu/getMenu:
post:
parameters:
- description: 可以什么都不填
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.RegistAndLoginStuct'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"返回成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 获取用户动态路由
tags:
- authorityAndMenu
/menu/getMenuList:
post:
consumes:
- application/json
parameters:
- description: 分页获取基础menu列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/modelInterface.PageInfo'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 分页获取基础menu列表
tags:
- menu
/user/changePassword: /user/changePassword:
post: post:
parameters: parameters:

Loading…
Cancel
Save