feat: 接入新版本openapi文档, 页面渲染兼容性待调试
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
// Date : 2024-07-20 22:57
|
||||
package router
|
||||
|
||||
import "github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
const (
|
||||
PrefixFuncName = "RouterPrefix" // 路由前缀函数名称
|
||||
MiddlewareFuncName = "RouterMiddleware" // 路由中间件函数名称
|
||||
@@ -46,3 +48,15 @@ type UriParam struct {
|
||||
const (
|
||||
FieldNameMeta = "Meta" // 元信息字段
|
||||
)
|
||||
|
||||
// DocConfig 文档配置
|
||||
type DocConfig struct {
|
||||
Enable bool `json:"enable" toml:"enable" yaml:"enable" dc:"是否启用文档"`
|
||||
UiTheme string `json:"ui_theme" toml:"ui_theme" yaml:"ui_theme" dc:"文档主题"`
|
||||
BaseUri string `json:"base_uri" toml:"base_uri" yaml:"base_uri" dc:"文档基础Uri"`
|
||||
Flag string `json:"flag" toml:"flag" yaml:"flag" dc:"文档标识"`
|
||||
ServerList *openapi3.Servers `json:"server_list" toml:"server_list" yaml:"server_list" dc:"服务环境列表"`
|
||||
Info *openapi3.Info `json:"info" toml:"info" yaml:"info" dc:"基础信息"`
|
||||
SecuritySchemes *openapi3.SecuritySchemes `json:"security_schemes" toml:"security_schemes" yaml:"security_schemes" dc:"服务安全策略"`
|
||||
CommonParameter *openapi3.ParametersMap `json:"common_parameter" toml:"common_parameter" yaml:"common_parameter" dc:"基础公共参数"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user