完成基础请求参数构建

This commit is contained in:
2024-12-24 12:33:50 +08:00
parent ff2fa198ee
commit dd46f5ad80
4 changed files with 64 additions and 33 deletions

View File

@ -49,7 +49,7 @@ type ParamConfig struct {
Type string `json:"type"` // 参数类型
Title string `json:"title"` // 参数标题
Description string `json:"description"` // 参数描述
IsRequired bool `json:"is_required"` // 是否必传
Required bool `json:"required"` // 是否必传
}
// ResultConfig 返回值配置

View File

@ -29,13 +29,18 @@ type SwaggerPathConfig struct {
//
// Date : 16:53 2024/4/19
type SwaggerPathConfigParameter struct {
Type string `json:"type,omitempty"` // 类型
Description string `json:"description"` // 描述
Name string `json:"name"` // 参数名称
In string `json:"in"` // 参数位置
Required bool `json:"required"` // 是否必传
EnumList []interface{} `json:"enum_list,omitempty"` // 枚举值列表
Schema map[string]string `json:"schema"` // 参数schema
Type string `json:"type,omitempty"` // 类型
Format string `json:"format"` // 格式化类型
Description string `json:"description"` // 描述
Name string `json:"name"` // 参数名称
In string `json:"in"` // 参数位置
Required bool `json:"required"` // 是否必传
EnumList []any `json:"enum_list,omitempty"` // 枚举值列表
Schema *SwaggerPathConfigParameterScheme `json:"schema"` // 参数schema
}
type SwaggerPathConfigParameterScheme struct {
Ref string `json:"$ref"` // 引用的数据结构定义
}
// SwaggerPathConfigResponse ...