添加 swagger 文档接口排序的 @Tag 设置说明 (#1964)
* fix: 修复欢迎信息中的 tab 缩进格式 * 添加 swagger 文档生成 * 添加 swagger 文档接口排序的 `@Tag` 设置说明
This commit is contained in:
parent
876d4187d9
commit
d24eeefc86
10
Makefile
10
Makefile
|
@ -48,7 +48,7 @@ build-image-server:
|
||||||
build-local:
|
build-local:
|
||||||
if [ -d "build" ];then rm -rf build; else echo "OK!"; fi \
|
if [ -d "build" ];then rm -rf build; else echo "OK!"; fi \
|
||||||
&& if [ -f "/.dockerenv" ];then echo "OK!"; else make build-web-local && make build-server-local; fi \
|
&& if [ -f "/.dockerenv" ];then echo "OK!"; else make build-web-local && make build-server-local; fi \
|
||||||
&& mkdir build && cp -r web/dist build/ && cp server/server build/ && cp -r server/resource build/resource
|
&& mkdir build && cp -r web/dist build/ && cp server/server build/ && cp -r server/resource build/resource
|
||||||
|
|
||||||
#本地环境打包前端
|
#本地环境打包前端
|
||||||
build-web-local:
|
build-web-local:
|
||||||
|
@ -63,13 +63,17 @@ build-server-local:
|
||||||
&& go build -ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${TAGS_OPT}" -v
|
&& go build -ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X main.Version=${TAGS_OPT}" -v
|
||||||
|
|
||||||
#打包前后端二合一镜像
|
#打包前后端二合一镜像
|
||||||
image: build
|
image: build
|
||||||
docker build -t ${REPOSITORY}/gin-vue-admin:${TAGS_OPT} -f deploy/docker/Dockerfile .
|
docker build -t ${REPOSITORY}/gin-vue-admin:${TAGS_OPT} -f deploy/docker/Dockerfile .
|
||||||
|
|
||||||
#尝鲜版
|
#尝鲜版
|
||||||
images: build build-image-web build-image-server
|
images: build build-image-web build-image-server
|
||||||
docker build -t ${REPOSITORY}/all:${TAGS_OPT} -f deploy/docker/Dockerfile .
|
docker build -t ${REPOSITORY}/all:${TAGS_OPT} -f deploy/docker/Dockerfile .
|
||||||
|
|
||||||
|
#swagger 文档生成
|
||||||
|
doc:
|
||||||
|
@cd server && swag init
|
||||||
|
|
||||||
#插件快捷打包: make plugin PLUGIN="这里是插件文件夹名称,默认为email"
|
#插件快捷打包: make plugin PLUGIN="这里是插件文件夹名称,默认为email"
|
||||||
plugin:
|
plugin:
|
||||||
if [ -d ".plugin" ];then rm -rf .plugin ; else echo "OK!"; fi && mkdir -p .plugin/${PLUGIN}/{server/plugin,web/plugin} \
|
if [ -d ".plugin" ];then rm -rf .plugin ; else echo "OK!"; fi && mkdir -p .plugin/${PLUGIN}/{server/plugin,web/plugin} \
|
||||||
|
|
|
@ -40,7 +40,7 @@ func RunWindowsServer() {
|
||||||
fmt.Printf(`
|
fmt.Printf(`
|
||||||
欢迎使用 gin-vue-admin
|
欢迎使用 gin-vue-admin
|
||||||
当前版本:v2.7.8-beta1
|
当前版本:v2.7.8-beta1
|
||||||
加群方式:微信号:shouzi_1994 QQ群:470239250
|
加群方式:微信号:shouzi_1994 QQ群:470239250
|
||||||
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
||||||
插件市场:https://plugin.gin-vue-admin.com
|
插件市场:https://plugin.gin-vue-admin.com
|
||||||
GVA讨论社区:https://support.qq.com/products/371961
|
GVA讨论社区:https://support.qq.com/products/371961
|
||||||
|
|
|
@ -13,6 +13,13 @@ import (
|
||||||
//go:generate go mod tidy
|
//go:generate go mod tidy
|
||||||
//go:generate go mod download
|
//go:generate go mod download
|
||||||
|
|
||||||
|
// 这部分 @Tag 设置用于排序, 需要排序的接口请按照下面的格式添加
|
||||||
|
// swag init 对 @Tag 只会从入口文件解析, 默认 main.go
|
||||||
|
// 也可通过 --generalInfo flag 指定其他文件
|
||||||
|
// @Tag.Name Base
|
||||||
|
// @Tag.Name SysUser
|
||||||
|
// @Tag.Description 用户
|
||||||
|
|
||||||
// @title Gin-Vue-Admin Swagger API接口文档
|
// @title Gin-Vue-Admin Swagger API接口文档
|
||||||
// @version v2.7.8-beta1
|
// @version v2.7.8-beta1
|
||||||
// @description 使用gin+vue进行极速开发的全栈开发基础平台
|
// @description 使用gin+vue进行极速开发的全栈开发基础平台
|
||||||
|
|
Loading…
Reference in New Issue