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

View File

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