diff --git a/cmd/metal-api/internal/service/size-service.go b/cmd/metal-api/internal/service/size-service.go index cf5510a1..1955c725 100644 --- a/cmd/metal-api/internal/service/size-service.go +++ b/cmd/metal-api/internal/service/size-service.go @@ -164,7 +164,7 @@ func (r *sizeResource) webService() *restful.WebService { Operation("updateSizeReservation"). Doc("updates a size reservation. if the size reservation was changed since this one was read, a conflict is returned"). Metadata(restfulspec.KeyOpenAPITags, tags). - Reads(v1.SizeUpdateRequest{}). + Reads(v1.SizeReservationUpdateRequest{}). Returns(http.StatusOK, "OK", v1.SizeReservationResponse{}). Returns(http.StatusConflict, "Conflict", httperrors.HTTPErrorResponse{}). DefaultReturns("Error", httperrors.HTTPErrorResponse{})) diff --git a/spec/metal-api.json b/spec/metal-api.json index 0d5caf7d..01889dae 100644 --- a/spec/metal-api.json +++ b/spec/metal-api.json @@ -4817,6 +4817,46 @@ "sizeid" ] }, + "v1.SizeReservationUpdateRequest": { + "properties": { + "amount": { + "description": "the amount of reservations of this size reservation", + "format": "int32", + "type": "integer" + }, + "description": { + "description": "a description for this entity", + "type": "string" + }, + "id": { + "description": "the unique ID of this entity", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "free labels associated with this size reservation.", + "type": "object" + }, + "name": { + "description": "a readable name for this entity", + "type": "string" + }, + "partitionid": { + "description": "the partition id of this size reservation", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "amount", + "id", + "partitionid" + ] + }, "v1.SizeReservationUsageResponse": { "properties": { "amount": { @@ -9236,7 +9276,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.SizeUpdateRequest" + "$ref": "#/definitions/v1.SizeReservationUpdateRequest" } } ],