{
"put": { "operationId": "updateWarrantyById", "description": "Update warranty with specified fields", "tags": ["Hardware"], "parameters": [ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }, { "name": "hardware_id", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Numeric ID of the hardware" }, { "name": "warranty_id", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Numeric ID of the warranty" } ], "requestBody": { "required": true, "description": "Warranty fields to update", "content": { "application/json": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/request" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/request" } } } }, "responses": { "200": { "description": "Object was updated correctly", "content": { "application/json": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/response" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/response" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "operationId": "deleteWarrantyById", "description": "Delete warranty", "tags": ["Hardware"], "parameters": [ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }, { "name": "hardware_id", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Numeric ID of the hardware" }, { "name": "warranty_id", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Numeric ID of the warranty" } ], "responses": { "200": { "description": "Message regarding a successful operation", "content": { "application/json": { "example": { "messages": { "message": "Deleted warranty" } } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }
}