🚑 swagger document authority
This commit is contained in:
148
docs/docs.go
148
docs/docs.go
@@ -15,6 +15,33 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/api/auth/permission/add": {
|
||||
"post": {
|
||||
"description": "批量添加权限",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"权限管理"
|
||||
],
|
||||
"summary": "批量添加权限",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "权限列表",
|
||||
"name": "permissions",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AddPermissionRequestDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/api/auth/role/add_role_to_user": {
|
||||
"post": {
|
||||
"description": "给指定用户添加角色",
|
||||
@@ -645,33 +672,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -789,6 +789,17 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AddPermissionRequestDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.ScaAuthPermission"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AddRoleToUserRequestDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -800,20 +811,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AddUserRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.PhoneLoginRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -855,6 +852,75 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.ScaAuthPermission": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_by": {
|
||||
"description": "创建人",
|
||||
"type": "string"
|
||||
},
|
||||
"created_time": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"deleted": {
|
||||
"description": "是否删除",
|
||||
"type": "integer"
|
||||
},
|
||||
"icon": {
|
||||
"description": "图标",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "主键ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"method": {
|
||||
"description": "请求方式",
|
||||
"type": "string"
|
||||
},
|
||||
"order": {
|
||||
"description": "排序",
|
||||
"type": "integer"
|
||||
},
|
||||
"parent_id": {
|
||||
"description": "父ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"description": "路径",
|
||||
"type": "string"
|
||||
},
|
||||
"permission_key": {
|
||||
"description": "权限关键字",
|
||||
"type": "string"
|
||||
},
|
||||
"permission_name": {
|
||||
"description": "权限名称",
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注 描述",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "状态 0 启用 1 停用",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"description": "类型 0 菜单 1 目录 2 按钮 -1其他",
|
||||
"type": "integer"
|
||||
},
|
||||
"update_by": {
|
||||
"description": "更新人",
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
@@ -4,6 +4,33 @@
|
||||
"contact": {}
|
||||
},
|
||||
"paths": {
|
||||
"/api/auth/permission/add": {
|
||||
"post": {
|
||||
"description": "批量添加权限",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"权限管理"
|
||||
],
|
||||
"summary": "批量添加权限",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "权限列表",
|
||||
"name": "permissions",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AddPermissionRequestDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/api/auth/role/add_role_to_user": {
|
||||
"post": {
|
||||
"description": "给指定用户添加角色",
|
||||
@@ -634,33 +661,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -778,6 +778,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AddPermissionRequestDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/model.ScaAuthPermission"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AddRoleToUserRequestDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -789,20 +800,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AddUserRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.PhoneLoginRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -844,6 +841,75 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"model.ScaAuthPermission": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_by": {
|
||||
"description": "创建人",
|
||||
"type": "string"
|
||||
},
|
||||
"created_time": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"deleted": {
|
||||
"description": "是否删除",
|
||||
"type": "integer"
|
||||
},
|
||||
"icon": {
|
||||
"description": "图标",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "主键ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"method": {
|
||||
"description": "请求方式",
|
||||
"type": "string"
|
||||
},
|
||||
"order": {
|
||||
"description": "排序",
|
||||
"type": "integer"
|
||||
},
|
||||
"parent_id": {
|
||||
"description": "父ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"path": {
|
||||
"description": "路径",
|
||||
"type": "string"
|
||||
},
|
||||
"permission_key": {
|
||||
"description": "权限关键字",
|
||||
"type": "string"
|
||||
},
|
||||
"permission_name": {
|
||||
"description": "权限名称",
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注 描述",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "状态 0 启用 1 停用",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"description": "类型 0 菜单 1 目录 2 按钮 -1其他",
|
||||
"type": "integer"
|
||||
},
|
||||
"update_by": {
|
||||
"description": "更新人",
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -8,6 +8,13 @@ definitions:
|
||||
password:
|
||||
type: string
|
||||
type: object
|
||||
dto.AddPermissionRequestDto:
|
||||
properties:
|
||||
permissions:
|
||||
items:
|
||||
$ref: '#/definitions/model.ScaAuthPermission'
|
||||
type: array
|
||||
type: object
|
||||
dto.AddRoleToUserRequestDto:
|
||||
properties:
|
||||
role_key:
|
||||
@@ -15,15 +22,6 @@ definitions:
|
||||
uid:
|
||||
type: string
|
||||
type: object
|
||||
dto.AddUserRequest:
|
||||
properties:
|
||||
password:
|
||||
type: string
|
||||
phone:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
type: object
|
||||
dto.PhoneLoginRequest:
|
||||
properties:
|
||||
auto_login:
|
||||
@@ -51,9 +49,78 @@ definitions:
|
||||
role_name:
|
||||
type: string
|
||||
type: object
|
||||
model.ScaAuthPermission:
|
||||
properties:
|
||||
created_by:
|
||||
description: 创建人
|
||||
type: string
|
||||
created_time:
|
||||
description: 创建时间
|
||||
type: string
|
||||
deleted:
|
||||
description: 是否删除
|
||||
type: integer
|
||||
icon:
|
||||
description: 图标
|
||||
type: string
|
||||
id:
|
||||
description: 主键ID
|
||||
type: integer
|
||||
method:
|
||||
description: 请求方式
|
||||
type: string
|
||||
order:
|
||||
description: 排序
|
||||
type: integer
|
||||
parent_id:
|
||||
description: 父ID
|
||||
type: integer
|
||||
path:
|
||||
description: 路径
|
||||
type: string
|
||||
permission_key:
|
||||
description: 权限关键字
|
||||
type: string
|
||||
permission_name:
|
||||
description: 权限名称
|
||||
type: string
|
||||
remark:
|
||||
description: 备注 描述
|
||||
type: string
|
||||
status:
|
||||
description: 状态 0 启用 1 停用
|
||||
type: integer
|
||||
type:
|
||||
description: 类型 0 菜单 1 目录 2 按钮 -1其他
|
||||
type: integer
|
||||
update_by:
|
||||
description: 更新人
|
||||
type: string
|
||||
update_time:
|
||||
description: 更新时间
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
paths:
|
||||
/api/auth/permission/add:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 批量添加权限
|
||||
parameters:
|
||||
- description: 权限列表
|
||||
in: body
|
||||
name: permissions
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AddPermissionRequestDto'
|
||||
produces:
|
||||
- application/json
|
||||
responses: {}
|
||||
summary: 批量添加权限
|
||||
tags:
|
||||
- 权限管理
|
||||
/api/auth/role/add_role_to_user:
|
||||
post:
|
||||
consumes:
|
||||
@@ -470,23 +537,6 @@ paths:
|
||||
summary: 刷新token
|
||||
tags:
|
||||
- 用户模块
|
||||
/api/user/add:
|
||||
post:
|
||||
parameters:
|
||||
- description: 用户信息
|
||||
in: body
|
||||
name: user
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AddUserRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: string
|
||||
summary: 添加用户
|
||||
tags:
|
||||
- 用户模块
|
||||
/api/user/login:
|
||||
post:
|
||||
parameters:
|
||||
|
Reference in New Issue
Block a user