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:
Jonathan Roth
2024-04-03 12:37:20 +03:00
committed by GitHub
parent 0d4552db5e
commit 80e775d5b4
4 changed files with 185 additions and 35 deletions

View File

@@ -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{}