提交一版返回值处理, 待调试

This commit is contained in:
2024-04-22 18:55:03 +08:00
parent 9569f7dfd0
commit a55cb66fd0
3 changed files with 103 additions and 13 deletions

View File

@ -52,7 +52,7 @@ type SwaggerPathConfig struct {
Tags []string `json:"tags"` // 接口标签
Summary string `json:"summary"` // 接口摘要
Parameters []*SwaggerPathConfigParameter `json:"parameters"` // 参数列表
Response map[string]*SwaggerPathConfigResponse `json:"response"` // code码 => 响应描述
Responses map[string]*SwaggerPathConfigResponse `json:"responses"` // code码 => 响应描述
}
// SwaggerPathConfigParameter ...
@ -146,6 +146,12 @@ type SwaggerPathInput struct {
ResponseList []*SwaggerResponseInput `json:"response_list"` // 响应数据
}
type SwaggerResponseInput struct {
Code string `json:"code"` // 状态码
Description string `json:"description"` // 描述
List []*SwaggerResponseItemInput `json:"list"` // 数据列表
}
// SwaggerParameterInput ...
//
// Author : go_developer@163.com<白茶清欢>
@ -160,12 +166,12 @@ type SwaggerParameterInput struct {
EnumList []interface{} `json:"enum_list"` // 枚举值列表
}
// SwaggerResponseInput 响应数据
// SwaggerResponseItemInput 响应数据
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 10:49 2024/4/22
type SwaggerResponseInput struct {
type SwaggerResponseItemInput struct {
Type string `json:"type"` // 类型
Description string `json:"description"` // 描述
Field string `json:"field"` // 字段名