@@ -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/v5"
4141 "github.com/haproxytech/client-native/v5/models"
4242 "github.com/haproxytech/client-native/v5/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 )
@@ -753,7 +753,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
753753 api .StorageReplaceStorageGeneralFileHandler = & handlers.StorageReplaceStorageGeneralFileHandlerImpl {Client : client , ReloadAgent : ra }
754754
755755 // setup OpenAPI v3 specification handler
756- api .Version3GetOpenapiv3SpecificationHandler = version3 .GetOpenapiv3SpecificationHandlerFunc (func (params version3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
756+ api .SpecificationOpenapiv3GetOpenapiv3SpecificationHandler = specification_openapiv3 .GetOpenapiv3SpecificationHandlerFunc (func (params specification_openapiv3 .GetOpenapiv3SpecificationParams , principal interface {}) middleware.Responder {
757757 v2 := openapi2.T {}
758758 v2JSONString := string (SwaggerJSON )
759759 v2JSONString = strings .ReplaceAll (v2JSONString , "#/definitions" , "#/components/schemas" )
@@ -762,7 +762,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
762762 err = v2 .UnmarshalJSON (curatedV2 )
763763 if err != nil {
764764 e := misc .HandleError (err )
765- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
765+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
766766 }
767767
768768 // if host is empty(dynamic hosts), server prop is empty,
@@ -776,9 +776,9 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
776776 v3 , err = openapi2conv .ToV3 (& v2 )
777777 if err != nil {
778778 e := misc .HandleError (err )
779- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
779+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
780780 }
781- return version3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
781+ return specification_openapiv3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
782782 })
783783
784784 // TODO: do we need a ReloadAgent for SPOE
0 commit comments