更新文档

This commit is contained in:
zhangwenjian committed 2020-03-17 14:46:27 +08:00
1 parent 7a804676aa
commit 7a43a01964
7 files changed
+393 -94

No files matched your search

+44 -7
View File
@@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2020-03-13 22:08:25.834082 +0800 CST m=+0.100276337
// 2020-03-17 14:25:08.714368 +0800 CST m=+0.081722206
package docs
@@ -20,7 +20,10 @@ var doc = `{
"description": "{{.Description}}",
"title": "{{.Title}}",
"contact": {},
"license": {},
"license": {
"name": "MIT",
"url": "https://github.com/wenjianzhang/go-admin/blob/master/LICENSE.md"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
@@ -433,9 +436,9 @@ var doc = `{
"application/json"
],
"tags": [
"配置"
"字典数据"
],
"summary": "添加配置",
"summary": "添加字典数据",
"parameters": [
{
"description": "data",
@@ -444,7 +447,7 @@ var doc = `{
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Config"
"$ref": "#/definitions/models.DictType"
}
}
],
@@ -2015,6 +2018,35 @@ var doc = `{
}
}
},
"/api/v1/user/profileAvatar": {
"post": {
"description": "获取JSON",
"consumes": [
"multipart/form-data"
],
"tags": [
"用户"
],
"summary": "修改头像",
"parameters": [
{
"type": "file",
"description": "file",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/login": {
"post": {
"description": "获取token",
@@ -2625,6 +2657,11 @@ var doc = `{
"models.Response": {
"type": "object",
"properties": {
"code": {
"description": "代码",
"type": "integer",
"example": 200
},
"data": {
"description": "数据集",
"type": "object"
@@ -2917,8 +2954,8 @@ var SwaggerInfo = swaggerInfo{
Host: "",
BasePath: "",
Schemes: []string{},
Title: "goadmin API",
Description: "Swagger.",
Title: "go-admin API",
Description: "基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档\n添加微信号: zwj891129 进入技术交流微信群 请备注,谢谢!",
}
type s struct{}
+43 -6
View File
@@ -1,10 +1,13 @@
{
"swagger": "2.0",
"info": {
"description": "Swagger.",
"title": "goadmin API",
"description": "基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档\n添加微信号: zwj891129 进入技术交流微信群 请备注,谢谢!",
"title": "go-admin API",
"contact": {},
"license": {},
"license": {
"name": "MIT",
"url": "https://github.com/wenjianzhang/go-admin/blob/master/LICENSE.md"
},
"version": "0.0.1"
},
"paths": {
@@ -415,9 +418,9 @@
"application/json"
],
"tags": [
"配置"
"字典数据"
],
"summary": "添加配置",
"summary": "添加字典数据",
"parameters": [
{
"description": "data",
@@ -426,7 +429,7 @@
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Config"
"$ref": "#/definitions/models.DictType"
}
}
],
@@ -1997,6 +2000,35 @@
}
}
},
"/api/v1/user/profileAvatar": {
"post": {
"description": "获取JSON",
"consumes": [
"multipart/form-data"
],
"tags": [
"用户"
],
"summary": "修改头像",
"parameters": [
{
"type": "file",
"description": "file",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "{\"code\": -1, \"message\": \"添加失败\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/login": {
"post": {
"description": "获取token",
@@ -2607,6 +2639,11 @@
"models.Response": {
"type": "object",
"properties": {
"code": {
"description": "代码",
"type": "integer",
"example": 200
},
"data": {
"description": "数据集",
"type": "object"
+33 -6
View File
@@ -288,6 +288,10 @@ definitions:
type: object
models.Response:
properties:
code:
description: 代码
example: 200
type: integer
data:
description: 数据集
type: object
@@ -482,9 +486,13 @@ definitions:
type: object
info:
contact: {}
description: Swagger.
license: {}
title: goadmin API
description: |-
基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档
添加微信号: zwj891129 进入技术交流微信群 请备注,谢谢!
license:
name: MIT
url: https://github.com/wenjianzhang/go-admin/blob/master/LICENSE.md
title: go-admin API
version: 0.0.1
paths:
/api/v1/config:
@@ -724,7 +732,7 @@ paths:
name: data
required: true
schema:
$ref: '#/definitions/models.Config'
$ref: '#/definitions/models.DictType'
type: object
responses:
"200":
@@ -733,9 +741,9 @@ paths:
type: string
security:
- Bearer: []
summary: 添加配置
summary: 添加字典数据
tags:
- 配置
- 字典数据
put:
consumes:
- application/json
@@ -1741,6 +1749,25 @@ paths:
summary: 获取当前登录用户
tags:
- 个人中心
/api/v1/user/profileAvatar:
post:
consumes:
- multipart/form-data
description: 获取JSON
parameters:
- description: file
in: formData
name: file
required: true
type: file
responses:
"200":
description: '{"code": -1, "message": "添加失败"}'
schema:
type: string
summary: 修改头像
tags:
- 用户
/login:
post:
consumes:
+5 -2
View File
@@ -9,9 +9,12 @@ import (
"log"
)
// @title goadmin API
// @title go-admin API
// @version 0.0.1
// @description Swagger.
// @description 基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档
// @description 添加qq群: 74520518 进入技术交流群 请备注,谢谢!
// @license.name MIT
// @license.url https://github.com/wenjianzhang/go-admin/blob/master/LICENSE.md
// @securityDefinitions.apikey Bearer
// @in header
+1 -1
View File
@@ -2,7 +2,7 @@ package models
type Response struct {
// 代码
Code int `json:"code" example:"200,500,400,401"`
Code int `json:"code" example:"200"`
// 数据集
Data interface{} `json:"data"`
// 错误消息