{
"get": { "operationId": "getCategoryById", "description": "Get category", "tags": ["Category"], "parameters": [ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }, { "$ref": "../../common/components.json#/components/request/parameters/id_param" } ], "responses": { "200": { "description": "Object was returned correctly", "content": { "application/json": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }, "put": { "operationId": "updateCategoryById", "description": "Update category with specified fields", "tags": ["Category"], "parameters": [ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }, { "$ref": "../../common/components.json#/components/request/parameters/id_param" } ], "requestBody": { "required": true, "description": "Category fields to update", "content": { "application/json": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/request/put" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/request/put" } } } }, "responses": { "200": { "description": "Object was updated correctly", "content": { "application/json": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "operationId": "deleteCategoryById", "description": "Delete category", "tags": ["Category"], "parameters": [ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }, { "$ref": "../../common/components.json#/components/request/parameters/id_param" } ], "responses": { "200": { "description": "Message regarding a successful operation", "content": { "application/json": { "example": { "messages": { "message": "Deleted category" } } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }
}