优化定义

This commit is contained in:
白茶清欢 2025-02-08 15:07:04 +08:00
parent 7d5e9a9d9c
commit 665b6fffbc
2 changed files with 9 additions and 9 deletions

View File

@ -30,8 +30,8 @@ type DocParseResult struct {
type UriBaseConfig struct { type UriBaseConfig struct {
Uri string `json:"uri"` // 接口路由 Uri string `json:"uri"` // 接口路由
Method string `json:"method"` // 接口请求方法 Method string `json:"method"` // 接口请求方法
ContentType string `json:"content_type"` // 接口请求类型 ContentType []string `json:"content_type"` // 接口请求类型
OutputContentType string `json:"output_content_type"` // 输出数据类型 OutputContentType []string `json:"output_content_type"` // 输出数据类型
TagList []string `json:"tag_list"` // 接口标签列表 TagList []string `json:"tag_list"` // 接口标签列表
Summary string `json:"summary"` // 接口摘要描述 Summary string `json:"summary"` // 接口摘要描述
Description string `json:"description"` // 接口详细描述 Description string `json:"description"` // 接口详细描述
@ -45,12 +45,13 @@ type UriBaseConfig struct {
// //
// Date : 16:23 2024/8/19 // Date : 16:23 2024/8/19
type ParamConfig struct { type ParamConfig struct {
Location string `json:"location"` // 参数位置 Location string `json:"location"` // 参数位置
Path string `json:"path"` // 参数路径 Path string `json:"path"` // 参数路径
Type string `json:"type"` // 参数类型 Type string `json:"type"` // 参数类型
Title string `json:"title"` // 参数标题 Title string `json:"title"` // 参数标题
Description string `json:"description"` // 参数描述 Description string `json:"description"` // 参数描述
Required bool `json:"required"` // 是否必传 Required bool `json:"required"` // 是否必传
Enum []string `json:"enum"` // 枚举值列表
} }
// ResultConfig 返回值配置 // ResultConfig 返回值配置

View File

@ -159,6 +159,5 @@ type PathItemOperationConfig struct {
// //
// resultList : 返回值列表 // resultList : 返回值列表
func (g *Generate) AddApi(baseCfg *define.UriBaseConfig, paramList []*define.ParamConfig, resultList []*define.ResultConfig) error { func (g *Generate) AddApi(baseCfg *define.UriBaseConfig, paramList []*define.ParamConfig, resultList []*define.ResultConfig) error {
return nil return nil
} }