添加 swagger 文档接口排序的 @Tag 设置说明 (#1964)

* fix: 修复欢迎信息中的 tab 缩进格式

* 添加 swagger 文档生成

* 添加 swagger 文档接口排序的 `@Tag` 设置说明
This commit is contained in:
Feng.YJ 2024-12-16 14:25:38 +08:00 committed by GitHub
parent 876d4187d9
commit d24eeefc86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 4 deletions

View File

@ -70,6 +70,10 @@ image: build
images: build build-image-web build-image-server
docker build -t ${REPOSITORY}/all:${TAGS_OPT} -f deploy/docker/Dockerfile .
#swagger 文档生成
doc:
@cd server && swag init
#插件快捷打包: make plugin PLUGIN="这里是插件文件夹名称,默认为email"
plugin:
if [ -d ".plugin" ];then rm -rf .plugin ; else echo "OK!"; fi && mkdir -p .plugin/${PLUGIN}/{server/plugin,web/plugin} \

View File

@ -40,7 +40,7 @@ func RunWindowsServer() {
fmt.Printf(`
欢迎使用 gin-vue-admin
当前版本:v2.7.8-beta1
加群方式:微信号shouzi_1994 QQ群470239250
加群方式:微信号shouzi_1994 QQ群470239250
项目地址https://github.com/flipped-aurora/gin-vue-admin
插件市场:https://plugin.gin-vue-admin.com
GVA讨论社区:https://support.qq.com/products/371961

View File

@ -13,6 +13,13 @@ import (
//go:generate go mod tidy
//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接口文档
// @version v2.7.8-beta1
// @description 使用gin+vue进行极速开发的全栈开发基础平台