@@ -36,7 +36,7 @@ import (
36
36
"github.com/go-openapi/errors"
37
37
"github.com/go-openapi/runtime"
38
38
"github.com/go-openapi/runtime/middleware"
39
- "github.com/go-openapi/swag"
39
+ "github.com/go-openapi/swag/cmdutils "
40
40
client_native "github.com/haproxytech/client-native/v6"
41
41
"github.com/haproxytech/client-native/v6/models"
42
42
"github.com/haproxytech/client-native/v6/options"
@@ -57,7 +57,7 @@ import (
57
57
"github.com/haproxytech/dataplaneapi/operations"
58
58
"github.com/haproxytech/dataplaneapi/operations/discovery"
59
59
"github.com/haproxytech/dataplaneapi/operations/specification"
60
- "github.com/haproxytech/dataplaneapi/operations/version3 "
60
+ "github.com/haproxytech/dataplaneapi/operations/specification_openapiv3 "
61
61
"github.com/haproxytech/dataplaneapi/rate"
62
62
"github.com/haproxytech/dataplaneapi/resilient"
63
63
socket_runtime "github.com/haproxytech/dataplaneapi/runtime"
@@ -88,25 +88,25 @@ func SetServerStartedCallback(callFunc func()) {
88
88
func configureFlags (api * operations.DataPlaneAPI ) {
89
89
cfg := dataplaneapi_config .Get ()
90
90
91
- haproxyOptionsGroup := swag .CommandLineOptionsGroup {
91
+ haproxyOptionsGroup := cmdutils .CommandLineOptionsGroup {
92
92
ShortDescription : "HAProxy options" ,
93
93
LongDescription : "Options for configuring haproxy locations." ,
94
94
Options : & cfg .HAProxy ,
95
95
}
96
96
97
- loggingOptionsGroup := swag .CommandLineOptionsGroup {
97
+ loggingOptionsGroup := cmdutils .CommandLineOptionsGroup {
98
98
ShortDescription : "Logging options" ,
99
99
LongDescription : "Options for configuring logging." ,
100
100
Options : & cfg .Logging ,
101
101
}
102
102
103
- syslogOptionsGroup := swag .CommandLineOptionsGroup {
103
+ syslogOptionsGroup := cmdutils .CommandLineOptionsGroup {
104
104
ShortDescription : "Syslog options" ,
105
105
LongDescription : "Options for configuring syslog logging." ,
106
106
Options : & cfg .Syslog ,
107
107
}
108
108
109
- api .CommandLineOptionsGroups = make ([]swag .CommandLineOptionsGroup , 0 , 1 )
109
+ api .CommandLineOptionsGroups = make ([]cmdutils .CommandLineOptionsGroup , 0 , 1 )
110
110
api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , haproxyOptionsGroup )
111
111
api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , loggingOptionsGroup )
112
112
api .CommandLineOptionsGroups = append (api .CommandLineOptionsGroups , syslogOptionsGroup )
@@ -949,7 +949,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
949
949
api .StorageReplaceStorageGeneralFileHandler = & handlers.StorageReplaceStorageGeneralFileHandlerImpl {Client : client , ReloadAgent : ra }
950
950
951
951
// 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 {
953
953
v2 := openapi2.T {}
954
954
v2JSONString := string (SwaggerJSON )
955
955
v2JSONString = strings .ReplaceAll (v2JSONString , "#/definitions" , "#/components/schemas" )
@@ -958,7 +958,7 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
958
958
err = v2 .UnmarshalJSON (curatedV2 )
959
959
if err != nil {
960
960
e := misc .HandleError (err )
961
- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
961
+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
962
962
}
963
963
964
964
// if host is empty(dynamic hosts), server prop is empty,
@@ -972,9 +972,9 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
972
972
v3 , err = openapi2conv .ToV3 (& v2 )
973
973
if err != nil {
974
974
e := misc .HandleError (err )
975
- return version3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
975
+ return specification_openapiv3 .NewGetOpenapiv3SpecificationDefault (int (* e .Code )).WithPayload (e )
976
976
}
977
- return version3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
977
+ return specification_openapiv3 .NewGetOpenapiv3SpecificationOK ().WithPayload (v3 )
978
978
})
979
979
980
980
// TODO: do we need a ReloadAgent for SPOE
0 commit comments