基础简版swagger文档生成

This commit is contained in:
2024-04-23 12:17:46 +08:00
parent d86880c329
commit 8bc001fc79
2 changed files with 17 additions and 18 deletions

View File

@ -61,7 +61,7 @@ type SwaggerPathConfig struct {
//
// Date : 16:53 2024/4/19
type SwaggerPathConfigParameter struct {
Type string `json:"type"` // 类型
Type string `json:"type,omitempty"` // 类型
Description string `json:"description"` // 描述
Name string `json:"name"` // 参数名称
In string `json:"in"` // 参数位置
@ -86,9 +86,9 @@ type SwaggerPathConfigResponse struct {
//
// Date : 17:01 2024/4/19
type SwaggerDefinition struct {
Type string `json:"type"` // 类型
Required []string `json:"required"` // 必传参数列表
Properties map[string]*SwaggerDefinitionProperty `json:"properties"` // 参数名 => 参数配置
Type string `json:"type"` // 类型
Required []string `json:"required,omitempty"` // 必传参数列表
Properties map[string]*SwaggerDefinitionProperty `json:"properties"` // 参数名 => 参数配置
}
// SwaggerDefinitionProperty ...