@@ -36,7 +36,7 @@ import (
3636 api_errors "github.com/go-openapi/errors"
3737 "github.com/go-openapi/runtime"
3838 "github.com/go-openapi/runtime/middleware"
39- "github.com/go-openapi/swag"
39+ "github.com/go-openapi/swag/cmdutils "
4040 client_native "github.com/haproxytech/client-native/v6"
4141 "github.com/haproxytech/client-native/v6/models"
4242 "github.com/haproxytech/client-native/v6/options"
@@ -57,7 +57,7 @@ import (
5757 "github.com/haproxytech/dataplaneapi/operations"
5858 "github.com/haproxytech/dataplaneapi/operations/discovery"
5959 "github.com/haproxytech/dataplaneapi/operations/specification"
60- "github.com/haproxytech/dataplaneapi/operations/version3 "
60+ "github.com/haproxytech/dataplaneapi/operations/specification_openapiv3 "
6161 "github.com/haproxytech/dataplaneapi/rate"
6262 "github.com/haproxytech/dataplaneapi/resilient"
6363 socket_runtime "github.com/haproxytech/dataplaneapi/runtime"
@@ -89,25 +89,25 @@ func SetServerStartedCallback(callFunc func()) {
8989func configureFlags (api * operations.DataPlaneAPI ) {
9090 cfg := dataplaneapi_config .Get ()
9191
92- haproxyOptionsGroup := swag .CommandLineOptionsGroup {
92+ haproxyOptionsGroup := cmdutils .CommandLineOptionsGroup {
9393 ShortDescription : "HAProxy options" ,
9494 LongDescription : "Options for configuring haproxy locations." ,
9595 Options : & cfg .HAProxy ,
9696 }
9797
98- loggingOptionsGroup := swag .CommandLineOptionsGroup {
98+ loggingOptionsGroup := cmdutils .CommandLineOptionsGroup {
9999 ShortDescription : "Logging options" ,
100100 LongDescription : "Options for configuring logging." ,
101101 Options : & cfg .Logging ,
102102 }
103103
104- syslogOptionsGroup := swag .CommandLineOptionsGroup {
104+ syslogOptionsGroup := cmdutils .CommandLineOptionsGroup {
105105 ShortDescription : "Syslog options" ,
106106 LongDescription : "Options for configuring syslog logging." ,
107107 Options : & cfg .Syslog ,
108108 }
109109
110- api .CommandLineOptionsGroups = make ([]swag .CommandLineOptionsGroup , 0 , 1 )
110+ api .CommandLineOptionsGroups = make ([]cmdutils .CommandLineOptionsGroup , 0 , 1 )
111111 api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , haproxyOptionsGroup )
112112 api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , loggingOptionsGroup )
113113 api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , syslogOptionsGroup )
@@ -1010,7 +1010,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
10101010 api .StorageReplaceStorageGeneralFileHandler = & handlers.StorageReplaceStorageGeneralFileHandlerImpl {Client : client , ReloadAgent : ra }
10111011
10121012 // setup OpenAPI v3 specification handler
1013- api .Version3GetOpenapiv3SpecificationHandler = version3 .GetOpenapiv3SpecificationHandlerFunc (func (params version3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
1013+ api .SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3 .GetOpenapiv3SpecificationHandlerFunc (func (params specification_openapiv3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
10141014 v2 := openapi2.T {}
10151015 v2JSONString := string (SwaggerJSON )
10161016 v2JSONString = strings .ReplaceAll (v2JSONString , "#/definitions" , "#/components/schemas" )
@@ -1019,7 +1019,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
10191019 err = v2 .UnmarshalJSON (curatedV2 )
10201020 if err != nil {
10211021 e := misc .HandleError (err )
1022- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
1022+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
10231023 }
10241024
10251025 // if host is empty(dynamic hosts), server prop is empty,
@@ -1033,9 +1033,9 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
10331033 v3 , err = openapi2conv .ToV3 (& v2 )
10341034 if err != nil {
10351035 e := misc .HandleError (err )
1036- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
1036+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
10371037 }
1038- return version3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
1038+ return specification_openapiv3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
10391039 })
10401040
10411041 // TODO: do we need a ReloadAgent for SPOE
0 commit comments