调整swag为最新包

This commit is contained in:
piexlMax
2023-05-23 00:08:53 +08:00
parent 4fc90c0168
commit 0e39f3ad05
5 changed files with 879 additions and 795 deletions
+321 -313
View File
@@ -1,22 +1,14 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag
// Code generated by swaggo/swag. DO NOT EDIT.
package docs
import (
"bytes"
"encoding/json"
"strings"
import "github.com/swaggo/swag"
"github.com/alecthomas/template"
"github.com/swaggo/swag"
)
var doc = `{
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{.Description}}",
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
@@ -1475,7 +1467,7 @@ var doc = `{
"summary": "生成验证码",
"responses": {
"200": {
"description": "生成验证码,返回包括随机数id,base64,验证码长度",
"description": "生成验证码,返回包括随机数id,base64,验证码长度,是否开启验证码",
"schema": {
"allOf": [
{
@@ -1997,161 +1989,6 @@ var doc = `{
}
}
},
"/excel/downloadTemplate": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"excel"
],
"summary": "下载模板",
"parameters": [
{
"type": "string",
"description": "模板名称",
"name": "fileName",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/excel/exportExcel": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/octet-stream"
],
"tags": [
"excel"
],
"summary": "导出Excel",
"parameters": [
{
"description": "导出Excel文件信息",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/example.ExcelInfo"
}
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/excel/importExcel": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"excel"
],
"summary": "导入Excel文件",
"parameters": [
{
"type": "file",
"description": "导入Excel文件",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "导入Excel文件",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"msg": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/excel/loadExcel": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"excel"
],
"summary": "加载Excel数据",
"responses": {
"200": {
"description": "加载Excel数据,返回包括列表,总数,页码,每页数量",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.PageResult"
},
"msg": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/fileUploadAndDownload/breakpointContinue": {
"post": {
"security": [
@@ -4940,6 +4777,14 @@ var doc = `{
"key-long": {
"description": "验证码长度",
"type": "integer"
},
"open-captcha": {
"description": "防爆破验证码开启此数,0代表每次登录都需要验证码,其他数字代表错误密码此数,如3代表错误三次后出现验证码",
"type": "integer"
},
"open-captcha-timeout": {
"description": "防爆破验证码超时时间,单位:s(秒)",
"type": "integer"
}
}
},
@@ -4960,39 +4805,6 @@ var doc = `{
}
}
},
"config.Email": {
"type": "object",
"properties": {
"from": {
"description": "收件人",
"type": "string"
},
"host": {
"description": "服务器地址",
"type": "string"
},
"is-ssl": {
"description": "是否SSL",
"type": "boolean"
},
"nickname": {
"description": "昵称",
"type": "string"
},
"port": {
"description": "端口",
"type": "integer"
},
"secret": {
"description": "密钥",
"type": "string"
},
"to": {
"description": "收件人:多个以英文逗号分隔",
"type": "string"
}
}
},
"config.Excel": {
"type": "object",
"properties": {
@@ -5055,7 +4867,7 @@ var doc = `{
}
}
},
"config.Mysql": {
"config.Mssql": {
"type": "object",
"properties": {
"config": {
@@ -5066,6 +4878,11 @@ var doc = `{
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5094,6 +4911,130 @@ var doc = `{
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
}
}
},
"config.Mysql": {
"type": "object",
"properties": {
"config": {
"description": "高级配置",
"type": "string"
},
"db-name": {
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
},
"log-zap": {
"description": "是否通过zap写入日志文件",
"type": "boolean"
},
"max-idle-conns": {
"description": "空闲中的最大连接数",
"type": "integer"
},
"max-open-conns": {
"description": "打开到数据库的最大连接数",
"type": "integer"
},
"password": {
"description": "数据库密码",
"type": "string"
},
"path": {
"description": "服务器地址:端口",
"type": "string"
},
"port": {
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
}
}
},
"config.Oracle": {
"type": "object",
"properties": {
"config": {
"description": "高级配置",
"type": "string"
},
"db-name": {
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
},
"log-zap": {
"description": "是否通过zap写入日志文件",
"type": "boolean"
},
"max-idle-conns": {
"description": "空闲中的最大连接数",
"type": "integer"
},
"max-open-conns": {
"description": "打开到数据库的最大连接数",
"type": "integer"
},
"password": {
"description": "数据库密码",
"type": "string"
},
"path": {
"description": "服务器地址:端口",
"type": "string"
},
"port": {
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5111,6 +5052,11 @@ var doc = `{
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5139,6 +5085,14 @@ var doc = `{
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5203,7 +5157,11 @@ var doc = `{
},
"autocode": {
"description": "auto",
"$ref": "#/definitions/config.Autocode"
"allOf": [
{
"$ref": "#/definitions/config.Autocode"
}
]
},
"aws-s3": {
"$ref": "#/definitions/config.AwsS3"
@@ -5213,7 +5171,11 @@ var doc = `{
},
"cors": {
"description": "跨域配置",
"$ref": "#/definitions/config.CORS"
"allOf": [
{
"$ref": "#/definitions/config.CORS"
}
]
},
"db-list": {
"type": "array",
@@ -5222,7 +5184,7 @@ var doc = `{
}
},
"email": {
"$ref": "#/definitions/config.Email"
"$ref": "#/definitions/github_com_flipped-aurora_gin-vue-admin_server_config.Email"
},
"excel": {
"$ref": "#/definitions/config.Excel"
@@ -5235,11 +5197,25 @@ var doc = `{
},
"local": {
"description": "oss",
"$ref": "#/definitions/config.Local"
"allOf": [
{
"$ref": "#/definitions/config.Local"
}
]
},
"mssql": {
"$ref": "#/definitions/config.Mssql"
},
"mysql": {
"description": "gorm",
"$ref": "#/definitions/config.Mysql"
"allOf": [
{
"$ref": "#/definitions/config.Mysql"
}
]
},
"oracle": {
"$ref": "#/definitions/config.Oracle"
},
"pgsql": {
"$ref": "#/definitions/config.Pgsql"
@@ -5281,6 +5257,11 @@ var doc = `{
"disable": {
"type": "boolean"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5309,6 +5290,14 @@ var doc = `{
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"type": {
"type": "string"
},
@@ -5343,6 +5332,9 @@ var doc = `{
"description": "Oss类型",
"type": "string"
},
"router-prefix": {
"type": "string"
},
"use-multipoint": {
"description": "多点登录拦截",
"type": "boolean"
@@ -5461,7 +5453,11 @@ var doc = `{
},
"sysUser": {
"description": "管理详情",
"$ref": "#/definitions/system.SysUser"
"allOf": [
{
"$ref": "#/definitions/system.SysUser"
}
]
},
"sysUserAuthorityID": {
"description": "管理角色ID",
@@ -5574,18 +5570,36 @@ var doc = `{
}
}
},
"example.ExcelInfo": {
"github_com_flipped-aurora_gin-vue-admin_server_config.Email": {
"type": "object",
"properties": {
"fileName": {
"description": "文件名",
"from": {
"description": "收件人",
"type": "string"
},
"infoList": {
"type": "array",
"items": {
"$ref": "#/definitions/system.SysBaseMenu"
}
"host": {
"description": "服务器地址",
"type": "string"
},
"is-ssl": {
"description": "是否SSL",
"type": "boolean"
},
"nickname": {
"description": "昵称",
"type": "string"
},
"port": {
"description": "端口",
"type": "integer"
},
"secret": {
"description": "密钥",
"type": "string"
},
"to": {
"description": "收件人:多个以英文逗号分隔",
"type": "string"
}
}
},
@@ -5752,28 +5766,40 @@ var doc = `{
"type": "object",
"properties": {
"authorityId": {
"type": "integer"
"type": "string",
"example": "int 角色id"
},
"authorityIds": {
"type": "array",
"items": {
"type": "integer"
}
"type": "string",
"example": "[]uint 角色id"
},
"email": {
"type": "string",
"example": "电子邮箱"
},
"enable": {
"type": "integer"
"type": "string",
"example": "int 是否启用"
},
"headerImg": {
"type": "string"
"type": "string",
"example": "头像链接"
},
"nickName": {
"type": "string"
"type": "string",
"example": "昵称"
},
"passWord": {
"type": "string"
"type": "string",
"example": "密码"
},
"phone": {
"type": "string",
"example": "电话号码"
},
"userName": {
"type": "string"
"type": "string",
"example": "用户名"
}
}
},
@@ -5967,9 +5993,7 @@ var doc = `{
"response.PageResult": {
"type": "object",
"properties": {
"list": {
"type": "object"
},
"list": {},
"page": {
"type": "integer"
},
@@ -5998,9 +6022,7 @@ var doc = `{
"code": {
"type": "integer"
},
"data": {
"type": "object"
},
"data": {},
"msg": {
"type": "string"
}
@@ -6084,6 +6106,9 @@ var doc = `{
"captchaLength": {
"type": "integer"
},
"openCaptcha": {
"type": "boolean"
},
"picPath": {
"type": "string"
}
@@ -6135,6 +6160,10 @@ var doc = `{
"description": "是否自动移动文件",
"type": "boolean"
},
"businessDB": {
"description": "业务数据库",
"type": "string"
},
"description": {
"description": "Struct中文名称",
"type": "string"
@@ -6219,6 +6248,38 @@ var doc = `{
"require": {
"description": "是否必填",
"type": "boolean"
},
"sort": {
"description": "是否增加排序",
"type": "boolean"
}
}
},
"system.Meta": {
"type": "object",
"properties": {
"activeName": {
"type": "string"
},
"closeTab": {
"description": "自动关闭tab",
"type": "boolean"
},
"defaultMenu": {
"description": "是否是基础路由(开发中)",
"type": "boolean"
},
"icon": {
"description": "菜单图标",
"type": "string"
},
"keepAlive": {
"description": "是否缓存",
"type": "boolean"
},
"title": {
"description": "菜单名",
"type": "string"
}
}
},
@@ -6346,10 +6407,6 @@ var doc = `{
"$ref": "#/definitions/system.SysBaseMenu"
}
},
"closeTab": {
"description": "自动关闭tab",
"type": "boolean"
},
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6358,32 +6415,28 @@ var doc = `{
"description": "创建时间",
"type": "string"
},
"defaultMenu": {
"description": "是否是基础路由(开发中)",
"type": "boolean"
},
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
"icon": {
"description": "菜单图标",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"keepAlive": {
"description": "是否缓存",
"type": "boolean"
},
"menuBtn": {
"type": "array",
"items": {
"$ref": "#/definitions/system.SysBaseMenuBtn"
}
},
"meta": {
"description": "附加属性",
"allOf": [
{
"$ref": "#/definitions/system.Meta"
}
]
},
"name": {
"description": "路由name",
"type": "string"
@@ -6406,10 +6459,6 @@ var doc = `{
"description": "排序标记",
"type": "integer"
},
"title": {
"description": "菜单名",
"type": "string"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
@@ -6571,10 +6620,6 @@ var doc = `{
"$ref": "#/definitions/system.SysMenu"
}
},
"closeTab": {
"description": "自动关闭tab",
"type": "boolean"
},
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6583,26 +6628,14 @@ var doc = `{
"description": "创建时间",
"type": "string"
},
"defaultMenu": {
"description": "是否是基础路由(开发中)",
"type": "boolean"
},
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
"icon": {
"description": "菜单图标",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"keepAlive": {
"description": "是否缓存",
"type": "boolean"
},
"menuBtn": {
"type": "array",
"items": {
@@ -6612,6 +6645,14 @@ var doc = `{
"menuId": {
"type": "string"
},
"meta": {
"description": "附加属性",
"allOf": [
{
"$ref": "#/definitions/system.Meta"
}
]
},
"name": {
"description": "路由name",
"type": "string"
@@ -6634,10 +6675,6 @@ var doc = `{
"description": "排序标记",
"type": "integer"
},
"title": {
"description": "菜单名",
"type": "string"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
@@ -6792,49 +6829,20 @@ var doc = `{
}
}`
type swaggerInfo struct {
Version string
Host string
BasePath string
Schemes []string
Title string
Description string
}
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
Version: "0.0.1",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "Swagger Example API",
Description: "This is a sample Server pets",
}
type s struct{}
func (s *s) ReadDoc() string {
sInfo := SwaggerInfo
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
t, err := template.New("swagger_info").Funcs(template.FuncMap{
"marshal": func(v interface{}) string {
a, _ := json.Marshal(v)
return string(a)
},
}).Parse(doc)
if err != nil {
return doc
}
var tpl bytes.Buffer
if err := t.Execute(&tpl, sInfo); err != nil {
return doc
}
return tpl.String()
var SwaggerInfo = &swag.Spec{
Version: "0.0.1",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "Swagger Example API",
Description: "This is a sample Server pets",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(swag.Name, &s{})
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
+305 -261
View File
@@ -6,7 +6,6 @@
"contact": {},
"version": "0.0.1"
},
"basePath": "/",
"paths": {
"/api/createApi": {
"post": {
@@ -1459,7 +1458,7 @@
"summary": "生成验证码",
"responses": {
"200": {
"description": "生成验证码,返回包括随机数id,base64,验证码长度",
"description": "生成验证码,返回包括随机数id,base64,验证码长度,是否开启验证码",
"schema": {
"allOf": [
{
@@ -1981,161 +1980,6 @@
}
}
},
"/excel/downloadTemplate": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"excel"
],
"summary": "下载模板",
"parameters": [
{
"type": "string",
"description": "模板名称",
"name": "fileName",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/excel/exportExcel": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/octet-stream"
],
"tags": [
"excel"
],
"summary": "导出Excel",
"parameters": [
{
"description": "导出Excel文件信息",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/example.ExcelInfo"
}
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/excel/importExcel": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"excel"
],
"summary": "导入Excel文件",
"parameters": [
{
"type": "file",
"description": "导入Excel文件",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "导入Excel文件",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"msg": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/excel/loadExcel": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"excel"
],
"summary": "加载Excel数据",
"responses": {
"200": {
"description": "加载Excel数据,返回包括列表,总数,页码,每页数量",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.PageResult"
},
"msg": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/fileUploadAndDownload/breakpointContinue": {
"post": {
"security": [
@@ -4924,6 +4768,14 @@
"key-long": {
"description": "验证码长度",
"type": "integer"
},
"open-captcha": {
"description": "防爆破验证码开启此数,0代表每次登录都需要验证码,其他数字代表错误密码此数,如3代表错误三次后出现验证码",
"type": "integer"
},
"open-captcha-timeout": {
"description": "防爆破验证码超时时间,单位:s(秒)",
"type": "integer"
}
}
},
@@ -4944,39 +4796,6 @@
}
}
},
"config.Email": {
"type": "object",
"properties": {
"from": {
"description": "收件人",
"type": "string"
},
"host": {
"description": "服务器地址",
"type": "string"
},
"is-ssl": {
"description": "是否SSL",
"type": "boolean"
},
"nickname": {
"description": "昵称",
"type": "string"
},
"port": {
"description": "端口",
"type": "integer"
},
"secret": {
"description": "密钥",
"type": "string"
},
"to": {
"description": "收件人:多个以英文逗号分隔",
"type": "string"
}
}
},
"config.Excel": {
"type": "object",
"properties": {
@@ -5039,7 +4858,7 @@
}
}
},
"config.Mysql": {
"config.Mssql": {
"type": "object",
"properties": {
"config": {
@@ -5050,6 +4869,11 @@
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5078,6 +4902,130 @@
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
}
}
},
"config.Mysql": {
"type": "object",
"properties": {
"config": {
"description": "高级配置",
"type": "string"
},
"db-name": {
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
},
"log-zap": {
"description": "是否通过zap写入日志文件",
"type": "boolean"
},
"max-idle-conns": {
"description": "空闲中的最大连接数",
"type": "integer"
},
"max-open-conns": {
"description": "打开到数据库的最大连接数",
"type": "integer"
},
"password": {
"description": "数据库密码",
"type": "string"
},
"path": {
"description": "服务器地址:端口",
"type": "string"
},
"port": {
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
}
}
},
"config.Oracle": {
"type": "object",
"properties": {
"config": {
"description": "高级配置",
"type": "string"
},
"db-name": {
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
},
"log-zap": {
"description": "是否通过zap写入日志文件",
"type": "boolean"
},
"max-idle-conns": {
"description": "空闲中的最大连接数",
"type": "integer"
},
"max-open-conns": {
"description": "打开到数据库的最大连接数",
"type": "integer"
},
"password": {
"description": "数据库密码",
"type": "string"
},
"path": {
"description": "服务器地址:端口",
"type": "string"
},
"port": {
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5095,6 +5043,11 @@
"description": "数据库名",
"type": "string"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5123,6 +5076,14 @@
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5187,7 +5148,11 @@
},
"autocode": {
"description": "auto",
"$ref": "#/definitions/config.Autocode"
"allOf": [
{
"$ref": "#/definitions/config.Autocode"
}
]
},
"aws-s3": {
"$ref": "#/definitions/config.AwsS3"
@@ -5197,7 +5162,11 @@
},
"cors": {
"description": "跨域配置",
"$ref": "#/definitions/config.CORS"
"allOf": [
{
"$ref": "#/definitions/config.CORS"
}
]
},
"db-list": {
"type": "array",
@@ -5206,7 +5175,7 @@
}
},
"email": {
"$ref": "#/definitions/config.Email"
"$ref": "#/definitions/github_com_flipped-aurora_gin-vue-admin_server_config.Email"
},
"excel": {
"$ref": "#/definitions/config.Excel"
@@ -5219,11 +5188,25 @@
},
"local": {
"description": "oss",
"$ref": "#/definitions/config.Local"
"allOf": [
{
"$ref": "#/definitions/config.Local"
}
]
},
"mssql": {
"$ref": "#/definitions/config.Mssql"
},
"mysql": {
"description": "gorm",
"$ref": "#/definitions/config.Mysql"
"allOf": [
{
"$ref": "#/definitions/config.Mysql"
}
]
},
"oracle": {
"$ref": "#/definitions/config.Oracle"
},
"pgsql": {
"$ref": "#/definitions/config.Pgsql"
@@ -5265,6 +5248,11 @@
"disable": {
"type": "boolean"
},
"engine": {
"description": "数据库引擎,默认InnoDB",
"type": "string",
"default": "InnoDB"
},
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5293,6 +5281,14 @@
"description": ":端口",
"type": "string"
},
"prefix": {
"description": "全局表前缀,单独定义TableName则不生效",
"type": "string"
},
"singular": {
"description": "是否开启全局禁用复数,true表示开启",
"type": "boolean"
},
"type": {
"type": "string"
},
@@ -5327,6 +5323,9 @@
"description": "Oss类型",
"type": "string"
},
"router-prefix": {
"type": "string"
},
"use-multipoint": {
"description": "多点登录拦截",
"type": "boolean"
@@ -5445,7 +5444,11 @@
},
"sysUser": {
"description": "管理详情",
"$ref": "#/definitions/system.SysUser"
"allOf": [
{
"$ref": "#/definitions/system.SysUser"
}
]
},
"sysUserAuthorityID": {
"description": "管理角色ID",
@@ -5558,18 +5561,36 @@
}
}
},
"example.ExcelInfo": {
"github_com_flipped-aurora_gin-vue-admin_server_config.Email": {
"type": "object",
"properties": {
"fileName": {
"description": "文件名",
"from": {
"description": "收件人",
"type": "string"
},
"infoList": {
"type": "array",
"items": {
"$ref": "#/definitions/system.SysBaseMenu"
}
"host": {
"description": "服务器地址",
"type": "string"
},
"is-ssl": {
"description": "是否SSL",
"type": "boolean"
},
"nickname": {
"description": "昵称",
"type": "string"
},
"port": {
"description": "端口",
"type": "integer"
},
"secret": {
"description": "密钥",
"type": "string"
},
"to": {
"description": "收件人:多个以英文逗号分隔",
"type": "string"
}
}
},
@@ -5736,28 +5757,40 @@
"type": "object",
"properties": {
"authorityId": {
"type": "integer"
"type": "string",
"example": "int 角色id"
},
"authorityIds": {
"type": "array",
"items": {
"type": "integer"
}
"type": "string",
"example": "[]uint 角色id"
},
"email": {
"type": "string",
"example": "电子邮箱"
},
"enable": {
"type": "integer"
"type": "string",
"example": "int 是否启用"
},
"headerImg": {
"type": "string"
"type": "string",
"example": "头像链接"
},
"nickName": {
"type": "string"
"type": "string",
"example": "昵称"
},
"passWord": {
"type": "string"
"type": "string",
"example": "密码"
},
"phone": {
"type": "string",
"example": "电话号码"
},
"userName": {
"type": "string"
"type": "string",
"example": "用户名"
}
}
},
@@ -5951,9 +5984,7 @@
"response.PageResult": {
"type": "object",
"properties": {
"list": {
"type": "object"
},
"list": {},
"page": {
"type": "integer"
},
@@ -5982,9 +6013,7 @@
"code": {
"type": "integer"
},
"data": {
"type": "object"
},
"data": {},
"msg": {
"type": "string"
}
@@ -6068,6 +6097,9 @@
"captchaLength": {
"type": "integer"
},
"openCaptcha": {
"type": "boolean"
},
"picPath": {
"type": "string"
}
@@ -6119,6 +6151,10 @@
"description": "是否自动移动文件",
"type": "boolean"
},
"businessDB": {
"description": "业务数据库",
"type": "string"
},
"description": {
"description": "Struct中文名称",
"type": "string"
@@ -6203,6 +6239,38 @@
"require": {
"description": "是否必填",
"type": "boolean"
},
"sort": {
"description": "是否增加排序",
"type": "boolean"
}
}
},
"system.Meta": {
"type": "object",
"properties": {
"activeName": {
"type": "string"
},
"closeTab": {
"description": "自动关闭tab",
"type": "boolean"
},
"defaultMenu": {
"description": "是否是基础路由(开发中)",
"type": "boolean"
},
"icon": {
"description": "菜单图标",
"type": "string"
},
"keepAlive": {
"description": "是否缓存",
"type": "boolean"
},
"title": {
"description": "菜单名",
"type": "string"
}
}
},
@@ -6330,10 +6398,6 @@
"$ref": "#/definitions/system.SysBaseMenu"
}
},
"closeTab": {
"description": "自动关闭tab",
"type": "boolean"
},
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6342,32 +6406,28 @@
"description": "创建时间",
"type": "string"
},
"defaultMenu": {
"description": "是否是基础路由(开发中)",
"type": "boolean"
},
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
"icon": {
"description": "菜单图标",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"keepAlive": {
"description": "是否缓存",
"type": "boolean"
},
"menuBtn": {
"type": "array",
"items": {
"$ref": "#/definitions/system.SysBaseMenuBtn"
}
},
"meta": {
"description": "附加属性",
"allOf": [
{
"$ref": "#/definitions/system.Meta"
}
]
},
"name": {
"description": "路由name",
"type": "string"
@@ -6390,10 +6450,6 @@
"description": "排序标记",
"type": "integer"
},
"title": {
"description": "菜单名",
"type": "string"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
@@ -6555,10 +6611,6 @@
"$ref": "#/definitions/system.SysMenu"
}
},
"closeTab": {
"description": "自动关闭tab",
"type": "boolean"
},
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6567,26 +6619,14 @@
"description": "创建时间",
"type": "string"
},
"defaultMenu": {
"description": "是否是基础路由(开发中)",
"type": "boolean"
},
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
"icon": {
"description": "菜单图标",
"type": "string"
},
"id": {
"description": "主键ID",
"type": "integer"
},
"keepAlive": {
"description": "是否缓存",
"type": "boolean"
},
"menuBtn": {
"type": "array",
"items": {
@@ -6596,6 +6636,14 @@
"menuId": {
"type": "string"
},
"meta": {
"description": "附加属性",
"allOf": [
{
"$ref": "#/definitions/system.Meta"
}
]
},
"name": {
"description": "路由name",
"type": "string"
@@ -6618,10 +6666,6 @@
"description": "排序标记",
"type": "integer"
},
"title": {
"description": "菜单名",
"type": "string"
},
"updatedAt": {
"description": "更新时间",
"type": "string"
+216 -168
View File
@@ -1,4 +1,3 @@
basePath: /
definitions:
config.AliyunOSS:
properties:
@@ -100,6 +99,12 @@ definitions:
key-long:
description: 验证码长度
type: integer
open-captcha:
description: 防爆破验证码开启此数,0代表每次登录都需要验证码,其他数字代表错误密码此数,如3代表错误三次后出现验证码
type: integer
open-captcha-timeout:
description: 防爆破验证码超时时间,单位:s(秒)
type: integer
type: object
config.Detail:
properties:
@@ -113,30 +118,6 @@ definitions:
description: 需要清理的表名
type: string
type: object
config.Email:
properties:
from:
description: 收件人
type: string
host:
description: 服务器地址
type: string
is-ssl:
description: 是否SSL
type: boolean
nickname:
description: 昵称
type: string
port:
description: 端口
type: integer
secret:
description: 密钥
type: string
to:
description: 收件人:多个以英文逗号分隔
type: string
type: object
config.Excel:
properties:
dir:
@@ -179,7 +160,7 @@ definitions:
description: 本地文件存储路径
type: string
type: object
config.Mysql:
config.Mssql:
properties:
config:
description: 高级配置
@@ -187,6 +168,10 @@ definitions:
db-name:
description: 数据库名
type: string
engine:
default: InnoDB
description: 数据库引擎,默认InnoDB
type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
@@ -208,6 +193,98 @@ definitions:
port:
description: :端口
type: string
prefix:
description: 全局表前缀,单独定义TableName则不生效
type: string
singular:
description: 是否开启全局禁用复数,true表示开启
type: boolean
username:
description: 数据库用户名
type: string
type: object
config.Mysql:
properties:
config:
description: 高级配置
type: string
db-name:
description: 数据库名
type: string
engine:
default: InnoDB
description: 数据库引擎,默认InnoDB
type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
log-zap:
description: 是否通过zap写入日志文件
type: boolean
max-idle-conns:
description: 空闲中的最大连接数
type: integer
max-open-conns:
description: 打开到数据库的最大连接数
type: integer
password:
description: 数据库密码
type: string
path:
description: 服务器地址:端口
type: string
port:
description: :端口
type: string
prefix:
description: 全局表前缀,单独定义TableName则不生效
type: string
singular:
description: 是否开启全局禁用复数,true表示开启
type: boolean
username:
description: 数据库用户名
type: string
type: object
config.Oracle:
properties:
config:
description: 高级配置
type: string
db-name:
description: 数据库名
type: string
engine:
default: InnoDB
description: 数据库引擎,默认InnoDB
type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
log-zap:
description: 是否通过zap写入日志文件
type: boolean
max-idle-conns:
description: 空闲中的最大连接数
type: integer
max-open-conns:
description: 打开到数据库的最大连接数
type: integer
password:
description: 数据库密码
type: string
path:
description: 服务器地址:端口
type: string
port:
description: :端口
type: string
prefix:
description: 全局表前缀,单独定义TableName则不生效
type: string
singular:
description: 是否开启全局禁用复数,true表示开启
type: boolean
username:
description: 数据库用户名
type: string
@@ -220,6 +297,10 @@ definitions:
db-name:
description: 数据库名
type: string
engine:
default: InnoDB
description: 数据库引擎,默认InnoDB
type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
@@ -241,6 +322,12 @@ definitions:
port:
description: :端口
type: string
prefix:
description: 全局表前缀,单独定义TableName则不生效
type: string
singular:
description: 是否开启全局禁用复数,true表示开启
type: boolean
username:
description: 数据库用户名
type: string
@@ -286,21 +373,23 @@ definitions:
aliyun-oss:
$ref: '#/definitions/config.AliyunOSS'
autocode:
$ref: '#/definitions/config.Autocode'
allOf:
- $ref: '#/definitions/config.Autocode'
description: auto
aws-s3:
$ref: '#/definitions/config.AwsS3'
captcha:
$ref: '#/definitions/config.Captcha'
cors:
$ref: '#/definitions/config.CORS'
allOf:
- $ref: '#/definitions/config.CORS'
description: 跨域配置
db-list:
items:
$ref: '#/definitions/config.SpecializedDB'
type: array
email:
$ref: '#/definitions/config.Email'
$ref: '#/definitions/github_com_flipped-aurora_gin-vue-admin_server_config.Email'
excel:
$ref: '#/definitions/config.Excel'
hua-wei-obs:
@@ -308,11 +397,17 @@ definitions:
jwt:
$ref: '#/definitions/config.JWT'
local:
$ref: '#/definitions/config.Local'
allOf:
- $ref: '#/definitions/config.Local'
description: oss
mssql:
$ref: '#/definitions/config.Mssql'
mysql:
$ref: '#/definitions/config.Mysql'
allOf:
- $ref: '#/definitions/config.Mysql'
description: gorm
oracle:
$ref: '#/definitions/config.Oracle'
pgsql:
$ref: '#/definitions/config.Pgsql'
qiniu:
@@ -340,6 +435,10 @@ definitions:
type: string
disable:
type: boolean
engine:
default: InnoDB
description: 数据库引擎,默认InnoDB
type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
@@ -361,6 +460,12 @@ definitions:
port:
description: :端口
type: string
prefix:
description: 全局表前缀,单独定义TableName则不生效
type: string
singular:
description: 是否开启全局禁用复数,true表示开启
type: boolean
type:
type: string
username:
@@ -385,6 +490,8 @@ definitions:
oss-type:
description: Oss类型
type: string
router-prefix:
type: string
use-multipoint:
description: 多点登录拦截
type: boolean
@@ -468,7 +575,8 @@ definitions:
description: 主键ID
type: integer
sysUser:
$ref: '#/definitions/system.SysUser'
allOf:
- $ref: '#/definitions/system.SysUser'
description: 管理详情
sysUserAuthorityID:
description: 管理角色ID
@@ -548,15 +656,29 @@ definitions:
description: 文件地址
type: string
type: object
example.ExcelInfo:
github_com_flipped-aurora_gin-vue-admin_server_config.Email:
properties:
fileName:
description: 文件名
from:
description: 收件人
type: string
host:
description: 服务器地址
type: string
is-ssl:
description: 是否SSL
type: boolean
nickname:
description: 昵称
type: string
port:
description: 端口
type: integer
secret:
description: 密钥
type: string
to:
description: 收件人:多个以英文逗号分隔
type: string
infoList:
items:
$ref: '#/definitions/system.SysBaseMenu'
type: array
type: object
request.AddMenuAuthorityInfo:
properties:
@@ -671,20 +793,31 @@ definitions:
request.Register:
properties:
authorityId:
type: integer
example: int 角色id
type: string
authorityIds:
items:
type: integer
type: array
example: '[]uint 角色id'
type: string
email:
example: 电子邮箱
type: string
enable:
type: integer
example: int 是否启用
type: string
headerImg:
example: 头像链接
type: string
nickName:
example: 昵称
type: string
passWord:
example: 密码
type: string
phone:
example: 电话号码
type: string
userName:
example: 用户名
type: string
type: object
request.RollBack:
@@ -817,8 +950,7 @@ definitions:
type: object
response.PageResult:
properties:
list:
type: object
list: {}
page:
type: integer
pageSize:
@@ -837,8 +969,7 @@ definitions:
properties:
code:
type: integer
data:
type: object
data: {}
msg:
type: string
type: object
@@ -892,6 +1023,8 @@ definitions:
type: string
captchaLength:
type: integer
openCaptcha:
type: boolean
picPath:
type: string
type: object
@@ -926,6 +1059,9 @@ definitions:
autoMoveFile:
description: 是否自动移动文件
type: boolean
businessDB:
description: 业务数据库
type: string
description:
description: Struct中文名称
type: string
@@ -988,6 +1124,29 @@ definitions:
require:
description: 是否必填
type: boolean
sort:
description: 是否增加排序
type: boolean
type: object
system.Meta:
properties:
activeName:
type: string
closeTab:
description: 自动关闭tab
type: boolean
defaultMenu:
description: 是否是基础路由(开发中)
type: boolean
icon:
description: 菜单图标
type: string
keepAlive:
description: 是否缓存
type: boolean
title:
description: 菜单名
type: string
type: object
system.SysApi:
properties:
@@ -1076,34 +1235,26 @@ definitions:
items:
$ref: '#/definitions/system.SysBaseMenu'
type: array
closeTab:
description: 自动关闭tab
type: boolean
component:
description: 对应前端文件路径
type: string
createdAt:
description: 创建时间
type: string
defaultMenu:
description: 是否是基础路由(开发中)
type: boolean
hidden:
description: 是否在列表隐藏
type: boolean
icon:
description: 菜单图标
type: string
id:
description: 主键ID
type: integer
keepAlive:
description: 是否缓存
type: boolean
menuBtn:
items:
$ref: '#/definitions/system.SysBaseMenuBtn'
type: array
meta:
allOf:
- $ref: '#/definitions/system.Meta'
description: 附加属性
name:
description: 路由name
type: string
@@ -1120,9 +1271,6 @@ definitions:
sort:
description: 排序标记
type: integer
title:
description: 菜单名
type: string
updatedAt:
description: 更新时间
type: string
@@ -1237,36 +1385,28 @@ definitions:
items:
$ref: '#/definitions/system.SysMenu'
type: array
closeTab:
description: 自动关闭tab
type: boolean
component:
description: 对应前端文件路径
type: string
createdAt:
description: 创建时间
type: string
defaultMenu:
description: 是否是基础路由(开发中)
type: boolean
hidden:
description: 是否在列表隐藏
type: boolean
icon:
description: 菜单图标
type: string
id:
description: 主键ID
type: integer
keepAlive:
description: 是否缓存
type: boolean
menuBtn:
items:
$ref: '#/definitions/system.SysBaseMenuBtn'
type: array
menuId:
type: string
meta:
allOf:
- $ref: '#/definitions/system.Meta'
description: 附加属性
name:
description: 路由name
type: string
@@ -1283,9 +1423,6 @@ definitions:
sort:
description: 排序标记
type: integer
title:
description: 菜单名
type: string
updatedAt:
description: 更新时间
type: string
@@ -2212,7 +2349,7 @@ paths:
- application/json
responses:
"200":
description: 生成验证码,返回包括随机数id,base64,验证码长度
description: 生成验证码,返回包括随机数id,base64,验证码长度,是否开启验证码
schema:
allOf:
- $ref: '#/definitions/response.Response'
@@ -2515,95 +2652,6 @@ paths:
summary: 发送邮件
tags:
- System
/excel/downloadTemplate:
get:
consumes:
- multipart/form-data
parameters:
- description: 模板名称
in: query
name: fileName
required: true
type: string
produces:
- application/json
responses:
"200":
description: ""
security:
- ApiKeyAuth: []
summary: 下载模板
tags:
- excel
/excel/exportExcel:
post:
consumes:
- application/json
parameters:
- description: 导出Excel文件信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/example.ExcelInfo'
produces:
- application/octet-stream
responses:
"200":
description: ""
security:
- ApiKeyAuth: []
summary: 导出Excel
tags:
- excel
/excel/importExcel:
post:
consumes:
- multipart/form-data
parameters:
- description: 导入Excel文件
in: formData
name: file
required: true
type: file
produces:
- application/json
responses:
"200":
description: 导入Excel文件
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 导入Excel文件
tags:
- excel
/excel/loadExcel:
get:
produces:
- application/json
responses:
"200":
description: 加载Excel数据,返回包括列表,总数,页码,每页数量
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/response.PageResult'
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 加载Excel数据
tags:
- excel
/fileUploadAndDownload/breakpointContinue:
post:
consumes: