mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-19 07:05:57 +08:00
Fix ACL, host and node swagger API definitions (#2864)
* Fix get all hosts response swagger type * Remove body parameter from GET ACL request * Use ApiNode response in requests that return it * Redact net.Address field from API Iface This field doesn't get declared correctly in the swagger file, and seems to break clients * Re-generate swagger swagger generate spec -t ee -o swagger.yml
This commit is contained in:
@@ -49,6 +49,12 @@ type hasAdmin struct {
|
||||
Admin bool
|
||||
}
|
||||
|
||||
// swagger:response apiHostSliceResponse
|
||||
type apiHostSliceResponse struct {
|
||||
// in: body
|
||||
Host []models.ApiHost
|
||||
}
|
||||
|
||||
// swagger:response apiHostResponse
|
||||
type apiHostResponse struct {
|
||||
// in: body
|
||||
@@ -251,7 +257,7 @@ type networkBodyResponse struct {
|
||||
Network models.Network `json:"network"`
|
||||
}
|
||||
|
||||
// swagger:parameters updateNetworkACL getNetworkACL
|
||||
// swagger:parameters updateNetworkACL
|
||||
type aclContainerBodyParam struct {
|
||||
// ACL Container
|
||||
// in: body
|
||||
@@ -269,7 +275,7 @@ type aclContainerResponse struct {
|
||||
type nodeSliceResponse struct {
|
||||
// Nodes
|
||||
// in: body
|
||||
Nodes []models.LegacyNode `json:"nodes"`
|
||||
Nodes []models.ApiNode `json:"nodes"`
|
||||
}
|
||||
|
||||
// swagger:response nodeResponse
|
||||
@@ -453,6 +459,7 @@ func useUnused() bool {
|
||||
_ = userAuthBodyParam{}
|
||||
_ = usernamePathParam{}
|
||||
_ = hasAdmin{}
|
||||
_ = apiHostSliceResponse{}
|
||||
_ = apiHostResponse{}
|
||||
_ = fileResponse{}
|
||||
_ = extClientConfParams{}
|
||||
|
Reference in New Issue
Block a user