From 744362acaa4571b8e61920b1465158cc6dcf4b23 Mon Sep 17 00:00:00 2001 From: zodial Date: Wed, 16 Oct 2024 11:32:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=B4=E6=98=8E=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/swagger.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/swagger.md diff --git a/docs/swagger.md b/docs/swagger.md new file mode 100644 index 0000000..ecec3e8 --- /dev/null +++ b/docs/swagger.md @@ -0,0 +1,9 @@ +## Swagger 文档生成 + +### 2024-10-16 更新 + +1. post的payload统一改为application/json +2. 支持多语言,新增执行参数-lang=语言标识,以`//@lang=语言 说明`声明指定语言说明 +3. 优化Description显示,tag换行显示,引用对象时采用本地说明 +4. 支持example定义,用`//@example=”或“//@example()`声明,前者不支持空格 +5. 增加path的参数及说明,于请求声明上一行添加注释,例如:`option (http.Get) = "/user/:id";`,上一行添加:`// @query=id @lang=语言标识 @format=string @example=ABC 说明文本`,其中query是必须指定声明,format默认为int \ No newline at end of file