diff --git a/VERSION b/VERSION index 46e8233..6e09167 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.28.2 +v0.28.3 diff --git a/api/models/rest_health_response.go b/api/models/rest_health_response.go index 9282ef4..f02eb95 100644 --- a/api/models/rest_health_response.go +++ b/api/models/rest_health_response.go @@ -24,8 +24,7 @@ type RestHealthResponse struct { Message *string `json:"message" yaml:"message"` // services - // Required: true - Services map[string]RestHealthResult `json:"services" yaml:"services"` + Services map[string]RestHealthResult `json:"services,omitempty" yaml:"services,omitempty"` // status // Required: true @@ -64,9 +63,8 @@ func (m *RestHealthResponse) validateMessage(formats strfmt.Registry) error { } func (m *RestHealthResponse) validateServices(formats strfmt.Registry) error { - - if err := validate.Required("services", "body", m.Services); err != nil { - return err + if swag.IsZero(m.Services) { // not required + return nil } for k := range m.Services { @@ -115,10 +113,6 @@ func (m *RestHealthResponse) ContextValidate(ctx context.Context, formats strfmt func (m *RestHealthResponse) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - if err := validate.Required("services", "body", m.Services); err != nil { - return err - } - for k := range m.Services { if val, ok := m.Services[k]; ok { diff --git a/api/models/rest_health_result.go b/api/models/rest_health_result.go index 6ad3498..cd386a2 100644 --- a/api/models/rest_health_result.go +++ b/api/models/rest_health_result.go @@ -24,8 +24,7 @@ type RestHealthResult struct { Message *string `json:"message" yaml:"message"` // services - // Required: true - Services map[string]RestHealthResult `json:"services" yaml:"services"` + Services map[string]RestHealthResult `json:"services,omitempty" yaml:"services,omitempty"` // status // Required: true @@ -64,9 +63,8 @@ func (m *RestHealthResult) validateMessage(formats strfmt.Registry) error { } func (m *RestHealthResult) validateServices(formats strfmt.Registry) error { - - if err := validate.Required("services", "body", m.Services); err != nil { - return err + if swag.IsZero(m.Services) { // not required + return nil } for k := range m.Services { @@ -115,10 +113,6 @@ func (m *RestHealthResult) ContextValidate(ctx context.Context, formats strfmt.R func (m *RestHealthResult) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - if err := validate.Required("services", "body", m.Services); err != nil { - return err - } - for k := range m.Services { if val, ok := m.Services[k]; ok { diff --git a/metal-api.json b/metal-api.json index 82c945b..0f20813 100644 --- a/metal-api.json +++ b/metal-api.json @@ -369,7 +369,6 @@ }, "required": [ "message", - "services", "status" ] }, @@ -390,7 +389,6 @@ }, "required": [ "message", - "services", "status" ] }, @@ -5406,7 +5404,7 @@ "url": "https://www.gnu.org/licenses/agpl-3.0.de.html" }, "title": "metal-api", - "version": "v0.28.2" + "version": "v0.28.3" }, "paths": { "/v1/audit/find": {