{
"get": { "operationId": "getDepartmentById", "description": "Get department", "tags": ["Department"], "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/department.json#/components/schemas/response" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }, "put": { "operationId": "updateDepartmentById", "description": "Update department with specified fields", "tags": ["Department"], "parameters": [ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }, { "$ref": "../../common/components.json#/components/request/parameters/id_param" } ], "requestBody": { "required": true, "description": "Department fields to update", "content": { "application/json": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/request/put" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/request/put" } } } }, "responses": { "200": { "description": "Object was updated correctly", "content": { "application/json": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } }, "application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "operationId": "deleteDepartmentById", "description": "Delete department", "tags": ["Department"], "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 department" } } } } }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }
}