Skip to content

Commit

Permalink
Fix swagger spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Sep 20, 2024
1 parent baac911 commit 2e59680
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/metal-api/internal/service/size-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}))
Expand Down
42 changes: 41 additions & 1 deletion spec/metal-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -9236,7 +9276,7 @@
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.SizeUpdateRequest"
"$ref": "#/definitions/v1.SizeReservationUpdateRequest"
}
}
],
Expand Down

0 comments on commit 2e59680

Please sign in to comment.