拓展接口响应

This commit is contained in:
2025-11-21 17:23:57 +08:00
parent 4224be8567
commit 7829ac9931
8 changed files with 142 additions and 49 deletions

View File

@@ -1663,7 +1663,7 @@ const docTemplate = `{
"parameters": [
{
"type": "string",
"description": "按名称模糊查询",
"description": "按营养名称模糊查询",
"name": "name",
"in": "query"
},
@@ -1684,6 +1684,12 @@ const docTemplate = `{
"description": "每页数量",
"name": "page_size",
"in": "query"
},
{
"type": "string",
"description": "按原料名称模糊查询",
"name": "raw_material_name",
"in": "query"
}
],
"responses": {
@@ -2665,10 +2671,16 @@ const docTemplate = `{
"parameters": [
{
"type": "string",
"description": "按名称模糊查询",
"description": "按原料名称模糊查询",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "按营养名称模糊查询",
"name": "nutrient_name",
"in": "query"
},
{
"type": "string",
"description": "排序字段,例如 \"id DESC\"",
@@ -3074,7 +3086,6 @@ const docTemplate = `{
},
{
"enum": [
7,
-1,
0,
1,
@@ -3084,12 +3095,12 @@ const docTemplate = `{
5,
-1,
5,
6
6,
7
],
"type": "integer",
"format": "int32",
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -3099,7 +3110,8 @@ const docTemplate = `{
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel"
"InvalidLevel",
"_numLevels"
],
"name": "level",
"in": "query"
@@ -9646,7 +9658,6 @@ const docTemplate = `{
"type": "integer",
"format": "int32",
"enum": [
7,
-1,
0,
1,
@@ -9656,10 +9667,10 @@ const docTemplate = `{
5,
-1,
5,
6
6,
7
],
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -9669,7 +9680,8 @@ const docTemplate = `{
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel"
"InvalidLevel",
"_numLevels"
]
}
},

View File

@@ -1655,7 +1655,7 @@
"parameters": [
{
"type": "string",
"description": "按名称模糊查询",
"description": "按营养名称模糊查询",
"name": "name",
"in": "query"
},
@@ -1676,6 +1676,12 @@
"description": "每页数量",
"name": "page_size",
"in": "query"
},
{
"type": "string",
"description": "按原料名称模糊查询",
"name": "raw_material_name",
"in": "query"
}
],
"responses": {
@@ -2657,10 +2663,16 @@
"parameters": [
{
"type": "string",
"description": "按名称模糊查询",
"description": "按原料名称模糊查询",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "按营养名称模糊查询",
"name": "nutrient_name",
"in": "query"
},
{
"type": "string",
"description": "排序字段,例如 \"id DESC\"",
@@ -3066,7 +3078,6 @@
},
{
"enum": [
7,
-1,
0,
1,
@@ -3076,12 +3087,12 @@
5,
-1,
5,
6
6,
7
],
"type": "integer",
"format": "int32",
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -3091,7 +3102,8 @@
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel"
"InvalidLevel",
"_numLevels"
],
"name": "level",
"in": "query"
@@ -9638,7 +9650,6 @@
"type": "integer",
"format": "int32",
"enum": [
7,
-1,
0,
1,
@@ -9648,10 +9659,10 @@
5,
-1,
5,
6
6,
7
],
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -9661,7 +9672,8 @@
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel"
"InvalidLevel",
"_numLevels"
]
}
},

View File

@@ -2517,7 +2517,6 @@ definitions:
- PlanTypeFilterSystem
zapcore.Level:
enum:
- 7
- -1
- 0
- 1
@@ -2528,10 +2527,10 @@ definitions:
- -1
- 5
- 6
- 7
format: int32
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -2542,6 +2541,7 @@ definitions:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
info:
contact:
email: divano@example.com
@@ -3564,7 +3564,7 @@ paths:
get:
description: 获取所有营养种类的列表,支持分页和过滤。
parameters:
- description: 按名称模糊查询
- description: 营养名称模糊查询
in: query
name: name
type: string
@@ -3580,6 +3580,10 @@ paths:
in: query
name: page_size
type: integer
- description: 按原料名称模糊查询
in: query
name: raw_material_name
type: string
produces:
- application/json
responses:
@@ -4152,10 +4156,14 @@ paths:
get:
description: 获取所有原料的列表,支持分页和过滤。
parameters:
- description: 按名称模糊查询
- description: 原料名称模糊查询
in: query
name: name
type: string
- description: 按营养名称模糊查询
in: query
name: nutrient_name
type: string
- description: 排序字段,例如 "id DESC"
in: query
name: order_by
@@ -4390,7 +4398,6 @@ paths:
name: end_time
type: string
- enum:
- 7
- -1
- 0
- 1
@@ -4401,12 +4408,12 @@ paths:
- -1
- 5
- 6
- 7
format: int32
in: query
name: level
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -4417,6 +4424,7 @@ paths:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
- enum:
- 邮件
- 企业微信