fix: 升级适配api-doc
This commit is contained in:
@ -23,12 +23,13 @@ import (
|
||||
"github.com/gin-contrib/pprof"
|
||||
|
||||
apiDocDefine "git.zhangdeman.cn/zhangdeman/api-doc/define"
|
||||
apiDocEnum "git.zhangdeman.cn/zhangdeman/api-doc/enums"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func newServerOption(port int, optionList ...SetServerOptionFunc) *serverOption {
|
||||
option := &serverOption{
|
||||
swaggerUiTheme: apiDocDefine.SwaggerUIThemeRedocFree,
|
||||
swaggerUiTheme: apiDocEnum.SwaggerUIThemeRedocFree.String(),
|
||||
swaggerBaseUri: "/doc/swagger",
|
||||
globalMiddlewareList: nil,
|
||||
disableSwaggerDoc: false,
|
||||
@ -125,7 +126,7 @@ func NewServer(port int, optionList ...SetServerOptionFunc) *server {
|
||||
}
|
||||
return &server{
|
||||
router: r,
|
||||
uiInstance: apiDoc.NewSwaggerUI(option.serverInfo, option.serverList, option.swaggerUiTheme),
|
||||
uiInstance: apiDoc.NewSwaggerUI(option.serverInfo, option.serverList, apiDocEnum.SwaggerUITheme(option.swaggerUiTheme)),
|
||||
port: port,
|
||||
option: option,
|
||||
}
|
||||
|
Reference in New Issue
Block a user