@@ -36,7 +36,7 @@ import (
3636 "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"
@@ -88,25 +88,25 @@ func SetServerStartedCallback(callFunc func()) {
8888func configureFlags (api * operations.DataPlaneAPI ) {
8989 cfg := dataplaneapi_config .Get ()
9090
91- haproxyOptionsGroup := swag .CommandLineOptionsGroup {
91+ haproxyOptionsGroup := cmdutils .CommandLineOptionsGroup {
9292 ShortDescription : "HAProxy options" ,
9393 LongDescription : "Options for configuring haproxy locations." ,
9494 Options : & cfg .HAProxy ,
9595 }
9696
97- loggingOptionsGroup := swag .CommandLineOptionsGroup {
97+ loggingOptionsGroup := cmdutils .CommandLineOptionsGroup {
9898 ShortDescription : "Logging options" ,
9999 LongDescription : "Options for configuring logging." ,
100100 Options : & cfg .Logging ,
101101 }
102102
103- syslogOptionsGroup := swag .CommandLineOptionsGroup {
103+ syslogOptionsGroup := cmdutils .CommandLineOptionsGroup {
104104 ShortDescription : "Syslog options" ,
105105 LongDescription : "Options for configuring syslog logging." ,
106106 Options : & cfg .Syslog ,
107107 }
108108
109- api .CommandLineOptionsGroups = make ([]swag .CommandLineOptionsGroup , 0 , 1 )
109+ api .CommandLineOptionsGroups = make ([]cmdutils .CommandLineOptionsGroup , 0 , 1 )
110110 api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , haproxyOptionsGroup )
111111 api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , loggingOptionsGroup )
112112 api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , syslogOptionsGroup )
@@ -949,7 +949,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
949949 api .StorageReplaceStorageGeneralFileHandler = & handlers.StorageReplaceStorageGeneralFileHandlerImpl {Client : client , ReloadAgent : ra }
950950
951951 // setup OpenAPI v3 specification handler
952- api .Version3GetOpenapiv3SpecificationHandler = version3 .GetOpenapiv3SpecificationHandlerFunc (func (params version3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
952+ api .SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3 .GetOpenapiv3SpecificationHandlerFunc (func (params specification_openapiv3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
953953 v2 := openapi2.T {}
954954 v2JSONString := string (SwaggerJSON )
955955 v2JSONString = strings .ReplaceAll (v2JSONString , "#/definitions" , "#/components/schemas" )
@@ -958,7 +958,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
958958 err = v2 .UnmarshalJSON (curatedV2 )
959959 if err != nil {
960960 e := misc .HandleError (err )
961- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
961+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
962962 }
963963
964964 // if host is empty(dynamic hosts), server prop is empty,
@@ -972,9 +972,9 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
972972 v3 , err = openapi2conv .ToV3 (& v2 )
973973 if err != nil {
974974 e := misc .HandleError (err )
975- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
975+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
976976 }
977- return version3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
977+ return specification_openapiv3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
978978 })
979979
980980 // TODO: do we need a ReloadAgent for SPOE
0 commit comments