增加角色复制后台功能 修复swagger不能带token的问题

This commit is contained in:
pixel
2020-04-20 16:21:50 +08:00
parent eea245e405
commit 0be0ec9a2f
11 changed files with 456 additions and 11 deletions
+147 -5
View File
@@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2020-04-15 09:37:13.5084762 +0800 CST m=+0.126566601
// 2020-04-20 14:50:58.4141704 +0800 CST m=+0.881639701
package docs
@@ -248,6 +248,45 @@ var doc = `{
}
}
},
"/authority/copyAuthority": {
"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/response.SysAuthorityCopyResponse"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"拷贝成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/authority/createAuthority": {
"post": {
"security": [
@@ -404,6 +443,45 @@ var doc = `{
}
}
},
"/authority/updateAuthority": {
"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/model.SysAuthority"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"设置成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/autoCode/createTemp": {
"post": {
"security": [
@@ -1588,6 +1666,45 @@ var doc = `{
}
}
},
"/user/deleteUser": {
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "删除用户",
"parameters": [
{
"description": "删除用户",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SetUserAuth"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/getUserList": {
"post": {
"security": [
@@ -2072,12 +2189,18 @@ var doc = `{
"component": {
"type": "string"
},
"defaultMenu": {
"type": "boolean"
},
"hidden": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"keepAlive": {
"type": "boolean"
},
"name": {
"type": "string"
},
@@ -2317,6 +2440,25 @@ var doc = `{
"type": "string"
}
}
},
"response.SysAuthorityCopyResponse": {
"type": "object",
"properties": {
"authority": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
},
"oldAuthorityId": {
"type": "integer"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "x-token",
"in": "header"
}
}
}`
@@ -2332,12 +2474,12 @@ type swaggerInfo struct {
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
Version: "",
Version: "0.0.1",
Host: "",
BasePath: "",
BasePath: "/",
Schemes: []string{},
Title: "",
Description: "",
Title: "Swagger Example API",
Description: "This is a sample Server pets",
}
type s struct{}
+147 -1
View File
@@ -1,9 +1,13 @@
{
"swagger": "2.0",
"info": {
"description": "This is a sample Server pets",
"title": "Swagger Example API",
"contact": {},
"license": {}
"license": {},
"version": "0.0.1"
},
"basePath": "/",
"paths": {
"/api/createApi": {
"post": {
@@ -227,6 +231,45 @@
}
}
},
"/authority/copyAuthority": {
"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/response.SysAuthorityCopyResponse"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"拷贝成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/authority/createAuthority": {
"post": {
"security": [
@@ -383,6 +426,45 @@
}
}
},
"/authority/updateAuthority": {
"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/model.SysAuthority"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"设置成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/autoCode/createTemp": {
"post": {
"security": [
@@ -1567,6 +1649,45 @@
}
}
},
"/user/deleteUser": {
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "删除用户",
"parameters": [
{
"description": "删除用户",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SetUserAuth"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/getUserList": {
"post": {
"security": [
@@ -2051,12 +2172,18 @@
"component": {
"type": "string"
},
"defaultMenu": {
"type": "boolean"
},
"hidden": {
"type": "boolean"
},
"icon": {
"type": "string"
},
"keepAlive": {
"type": "boolean"
},
"name": {
"type": "string"
},
@@ -2296,6 +2423,25 @@
"type": "string"
}
}
},
"response.SysAuthorityCopyResponse": {
"type": "object",
"properties": {
"authority": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
},
"oldAuthorityId": {
"type": "integer"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "x-token",
"in": "header"
}
}
}
+93
View File
@@ -1,3 +1,4 @@
basePath: /
definitions:
config.Captcha:
properties:
@@ -217,10 +218,14 @@ definitions:
type: array
component:
type: string
defaultMenu:
type: boolean
hidden:
type: boolean
icon:
type: string
keepAlive:
type: boolean
name:
type: string
parentId:
@@ -380,9 +385,20 @@ definitions:
uuid:
type: string
type: object
response.SysAuthorityCopyResponse:
properties:
authority:
$ref: '#/definitions/model.SysAuthority'
type: object
oldAuthorityId:
type: integer
type: object
info:
contact: {}
description: This is a sample Server pets
license: {}
title: Swagger Example API
version: 0.0.1
paths:
/api/createApi:
post:
@@ -520,6 +536,30 @@ paths:
summary: 创建基础api
tags:
- SysApi
/authority/copyAuthority:
post:
consumes:
- application/json
parameters:
- description: 拷贝角色
in: body
name: data
required: true
schema:
$ref: '#/definitions/response.SysAuthorityCopyResponse'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"拷贝成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 拷贝角色
tags:
- authority
/authority/createAuthority:
post:
consumes:
@@ -616,6 +656,30 @@ paths:
summary: 设置角色资源权限
tags:
- authority
/authority/updateAuthority:
post:
consumes:
- application/json
parameters:
- description: 设置角色资源权限
in: body
name: data
required: true
schema:
$ref: '#/definitions/model.SysAuthority'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"设置成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 设置角色资源权限
tags:
- authority
/autoCode/createTemp:
post:
consumes:
@@ -1343,6 +1407,30 @@ paths:
summary: 用户修改密码
tags:
- SysUser
/user/deleteUser:
delete:
consumes:
- application/json
parameters:
- description: 删除用户
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.SetUserAuth'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"修改成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 删除用户
tags:
- SysUser
/user/getUserList:
post:
consumes:
@@ -1438,4 +1526,9 @@ paths:
summary: 注册工作流
tags:
- workflow
securityDefinitions:
ApiKeyAuth:
in: header
name: x-token
type: apiKey
swagger: "2.0"