openapi格式的文档基础生成 #3

Merged
zhangdeman merged 32 commits from feature/upgrade_swagger into master 2025-02-14 21:13:00 +08:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 665b6fffbc - Show all commits

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"` // 接口详细描述
@ -51,6 +51,7 @@ type ParamConfig struct {
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
} }