@@ -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 )
@@ -918,7 +918,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
918918 api .StorageReplaceStorageGeneralFileHandler = & handlers.StorageReplaceStorageGeneralFileHandlerImpl {Client : client , ReloadAgent : ra }
919919
920920 // setup OpenAPI v3 specification handler
921- api .Version3GetOpenapiv3SpecificationHandler = version3 .GetOpenapiv3SpecificationHandlerFunc (func (params version3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
921+ api .SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3 .GetOpenapiv3SpecificationHandlerFunc (func (params specification_openapiv3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
922922 v2 := openapi2.T {}
923923 v2JSONString := string (SwaggerJSON )
924924 v2JSONString = strings .ReplaceAll (v2JSONString , "#/definitions" , "#/components/schemas" )
@@ -927,7 +927,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
927927 err = v2 .UnmarshalJSON (curatedV2 )
928928 if err != nil {
929929 e := misc .HandleError (err )
930- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
930+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
931931 }
932932
933933 // if host is empty(dynamic hosts), server prop is empty,
@@ -941,9 +941,9 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
941941 v3 , err = openapi2conv .ToV3 (& v2 )
942942 if err != nil {
943943 e := misc .HandleError (err )
944- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
944+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
945945 }
946- return version3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
946+ return specification_openapiv3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
947947 })
948948
949949 // TODO: do we need a ReloadAgent for SPOE
0 commit comments