File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import (
2222 "strconv"
2323 "strings"
2424
25- openapi_middleware "github.com/go-openapi/runtime/middleware"
25+ "github.com/go-openapi/runtime/server- middleware/docui "
2626 clientnative "github.com/haproxytech/client-native/v6"
2727 cn_configuration "github.com/haproxytech/client-native/v6/configuration"
2828 "github.com/haproxytech/client-native/v6/models"
@@ -230,8 +230,8 @@ func MaxBodySizeMiddleware(maxSize int64) Adapter {
230230// behavior of the previous go-swagger server. All other requests pass through.
231231func SpecDocsMiddleware (swaggerJSON []byte , basePath , title string ) Adapter {
232232 return func (h http.Handler ) http.Handler {
233- return openapi_middleware . Spec ( "" , swaggerJSON ,
234- openapi_middleware .Redoc (openapi_middleware. RedocOpts { BasePath : basePath , Title : title }, h ))
233+ return docui . ServeSpec ( swaggerJSON ,
234+ docui .Redoc (h , docui . WithUIBasePath ( basePath ), docui . WithUITitle ( title ) ))
235235 }
236236}
237237
You can’t perform that action at this time.
0 commit comments