Fix integration tests issue due to types only used by go-swagger

This commit is contained in:
cameronts
2022-09-11 06:14:36 -07:00
parent 661290c84d
commit 9ff936e748

View File

@@ -33,6 +33,8 @@ import (
"github.com/gravitl/netmaker/netclient/config"
)
var _ = useUnused() // "use" the function to prevent "unused function" errors
// swagger:parameters getNodeDNS getCustomDNS getDNS
type dnsPathParams struct {
// Network
@@ -349,3 +351,50 @@ type usernamePathParam struct {
// in: path
Username string `json:"username"`
}
// prevent issues with integration tests for types just used by Swagger docs.
func useUnused() bool {
_ = dnsPathParams{}
_ = dnsParams{}
_ = dnsResponse{}
_ = dnsDeletePathParams{}
_ = stringJSONResponse{}
_ = getAllClientsRequest{}
_ = extClientSliceResponse{}
_ = extClientResponse{}
_ = successResponse{}
_ = extClientPathParams{}
_ = extClientBodyParam{}
_ = extClientNetworkPathParam{}
_ = createExtClientPathParams{}
_ = networkNodePathParams{}
_ = byteArrayResponse{}
_ = headerNetworks{}
_ = getNetworksSliceResponse{}
_ = networkBodyParam{}
_ = networkPathParam{}
_ = networkAccessKeyNamePathParam{}
_ = networkBodyResponse{}
_ = accessKeyBodyParam{}
_ = accessKeyBodyResponse{}
_ = accessKeySliceBodyResponse{}
_ = aclContainerBodyParam{}
_ = aclContainerResponse{}
_ = nodeSliceResponse{}
_ = nodeResponse{}
_ = nodeBodyParam{}
_ = relayRequestBodyParam{}
_ = egressGatewayBodyParam{}
_ = authParamBodyParam{}
_ = serverConfigResponse{}
_ = nodeGetResponse{}
_ = nodeLastModifiedResponse{}
_ = registerRequestBodyParam{}
_ = registerResponse{}
_ = boolResponse{}
_ = userBodyParam{}
_ = userBodyResponse{}
_ = userAuthBodyParam{}
_ = usernamePathParam{}
return false
}