{ "openapi": "3.0.1", "info": { "title": "API IP32", "version": "v1" }, "servers": [ { "url": "http://localhost:5196" } ], "paths": { "/api/Absence": { "get": { "tags": [ "Absence" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } } } } } }, "post": { "tags": [ "Absence" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbsenceRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AbsenceRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AbsenceRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Absence/{id}": { "get": { "tags": [ "Absence" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } } } } }, "delete": { "tags": [ "Absence" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Absence" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbsenceRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AbsenceRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AbsenceRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Absence/updateStatus/{id}": { "put": { "tags": [ "Absence" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Status" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Status" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Status" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Absence/byStatus": { "get": { "tags": [ "Absence" ], "parameters": [ { "name": "status", "in": "query", "schema": { "$ref": "#/components/schemas/Status" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } } } } } } }, "/api/Absence/byEmployee/{employeeId}": { "get": { "tags": [ "Absence" ], "parameters": [ { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } } } } } } }, "/api/Absence/byTeam/{teamId}": { "get": { "tags": [ "Absence" ], "parameters": [ { "name": "teamId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencesEmployeeResponse" } } } } } } } }, "/api/Account": { "get": { "tags": [ "Account" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountEmployeeResponse" } } } } } } }, "post": { "tags": [ "Account" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AccountRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Account/{id}": { "get": { "tags": [ "Account" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountEmployeeResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountEmployeeResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountEmployeeResponse" } } } } } }, "delete": { "tags": [ "Account" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Account" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AccountRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Account/byEmployee/{employeeId}": { "get": { "tags": [ "Account" ], "parameters": [ { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountEmployeeResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountEmployeeResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountEmployeeResponse" } } } } } } }, "/api/Department": { "get": { "tags": [ "Department" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Department" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Department" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Department" } } } } } } }, "post": { "tags": [ "Department" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepartmentRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DepartmentRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DepartmentRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Department/{id}": { "get": { "tags": [ "Department" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/Department" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Department" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Department" } } } } } }, "delete": { "tags": [ "Department" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Department" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepartmentRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DepartmentRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DepartmentRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Document": { "get": { "tags": [ "Document" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } } } } } } }, "post": { "tags": [ "Document" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DocumentRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DocumentRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Document/{id}": { "get": { "tags": [ "Document" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } } } } } }, "put": { "tags": [ "Document" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/DocumentRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/DocumentRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Document/byEmployee/{employeeId}": { "get": { "tags": [ "Document" ], "parameters": [ { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentEmployeeResponse" } } } } } } } }, "/api/Document/upload-document/{employeeId}": { "post": { "tags": [ "Document" ], "parameters": [ { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "document": { "type": "string", "format": "binary" } } }, "encoding": { "document": { "style": "form" } } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Document/{id}/{employeeId}": { "delete": { "tags": [ "Document" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } } }, "/api/Employee": { "get": { "tags": [ "Employee" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } } } } } } }, "post": { "tags": [ "Employee" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmployeeRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/EmployeeRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/EmployeeRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Employee/byTeam/{teamId}": { "get": { "tags": [ "Employee" ], "parameters": [ { "name": "teamId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } } } } } } } }, "/api/Employee/{id}": { "get": { "tags": [ "Employee" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/EmployeePositionTeamResponse" } } } } } }, "delete": { "tags": [ "Employee" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Employee" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmployeeRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/EmployeeRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/EmployeeRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Login": { "post": { "tags": [ "Login" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountLoginRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountLoginRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AccountLoginRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Photo": { "get": { "tags": [ "Photo" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FileResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FileResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FileResponse" } } } } } } }, "post": { "tags": [ "Photo" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhotoRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PhotoRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PhotoRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Photo/{id}": { "get": { "tags": [ "Photo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/FileResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/FileResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/FileResponse" } } } } } } }, "/api/Photo/upload-photo/{employeeId}": { "post": { "tags": [ "Photo" ], "parameters": [ { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "photo": { "type": "string", "format": "binary" } } }, "encoding": { "photo": { "style": "form" } } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Photo/{id}/{employeeId}": { "delete": { "tags": [ "Photo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Photo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "employeeId", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "photo": { "type": "string", "format": "binary" } } }, "encoding": { "photo": { "style": "form" } } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Position": { "get": { "tags": [ "Position" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Position" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Position" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Position" } } } } } } }, "post": { "tags": [ "Position" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositionRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PositionRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PositionRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Position/{id}": { "get": { "tags": [ "Position" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/Position" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Position" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Position" } } } } } }, "delete": { "tags": [ "Position" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Position" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositionRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PositionRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PositionRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Report": { "get": { "tags": [ "Report" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ReportEmployeeResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ReportEmployeeResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ReportEmployeeResponse" } } } } } } }, "post": { "tags": [ "Report" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ReportRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ReportRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Report/{id}": { "get": { "tags": [ "Report" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ReportEmployeeResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ReportEmployeeResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ReportEmployeeResponse" } } } } } }, "delete": { "tags": [ "Report" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Report" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ReportRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ReportRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Team": { "get": { "tags": [ "Team" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamDepartmentResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamDepartmentResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamDepartmentResponse" } } } } } } }, "post": { "tags": [ "Team" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TeamRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/TeamRequest" } } } }, "responses": { "200": { "description": "Success" } } } }, "/api/Team/{id}": { "get": { "tags": [ "Team" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/TeamDepartmentResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/TeamDepartmentResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TeamDepartmentResponse" } } } } } }, "delete": { "tags": [ "Team" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } } }, "put": { "tags": [ "Team" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TeamRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/TeamRequest" } } } }, "responses": { "200": { "description": "Success" } } } } }, "components": { "schemas": { "Absence": { "required": [ "employeeID", "endDate", "startDate", "status" ], "type": "object", "properties": { "absenceID": { "type": "integer", "format": "int32" }, "employeeID": { "type": "integer", "format": "int32" }, "description": { "type": "string", "nullable": true }, "startDate": { "type": "string", "format": "date-time" }, "endDate": { "type": "string", "format": "date-time" }, "status": { "$ref": "#/components/schemas/Status" }, "rejectionReason": { "maxLength": 200, "type": "string", "nullable": true }, "employee": { "$ref": "#/components/schemas/Employee" } }, "additionalProperties": false }, "AbsenceRequest": { "type": "object", "properties": { "employeeID": { "type": "integer", "format": "int32" }, "description": { "type": "string", "nullable": true }, "startDate": { "type": "string", "format": "date-time" }, "endDate": { "type": "string", "format": "date-time" }, "status": { "$ref": "#/components/schemas/Status" }, "rejectionReason": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AbsencesEmployeeResponse": { "type": "object", "properties": { "absenceId": { "type": "integer", "format": "int32" }, "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "teamId": { "type": "integer", "format": "int32" }, "teamName": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "startDate": { "type": "string", "format": "date-time" }, "endDate": { "type": "string", "format": "date-time" }, "status": { "$ref": "#/components/schemas/Status" }, "rejectionReason": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Account": { "required": [ "accountType", "employeeID", "password", "username" ], "type": "object", "properties": { "accountID": { "type": "integer", "format": "int32" }, "employeeID": { "type": "integer", "format": "int32" }, "username": { "maxLength": 20, "minLength": 1, "type": "string" }, "password": { "maxLength": 100, "minLength": 1, "type": "string" }, "accountType": { "$ref": "#/components/schemas/Role" }, "employee": { "$ref": "#/components/schemas/Employee" } }, "additionalProperties": false }, "AccountEmployeeResponse": { "type": "object", "properties": { "accountID": { "type": "integer", "format": "int32" }, "employeeID": { "type": "integer", "format": "int32" }, "username": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true }, "accountType": { "$ref": "#/components/schemas/Role" }, "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "email": { "type": "string", "nullable": true }, "phone": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "city": { "type": "string", "nullable": true }, "street": { "type": "string", "nullable": true }, "postalCode": { "type": "string", "nullable": true }, "photo": { "$ref": "#/components/schemas/FileResponse" }, "dateOfEmployment": { "type": "string", "format": "date-time" }, "teamID": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "AccountLoginRequest": { "type": "object", "properties": { "username": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AccountRequest": { "type": "object", "properties": { "employeeID": { "type": "integer", "format": "int32" }, "username": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true }, "accountType": { "$ref": "#/components/schemas/Role" } }, "additionalProperties": false }, "Department": { "required": [ "name" ], "type": "object", "properties": { "derpartmentID": { "type": "integer", "format": "int32" }, "name": { "minLength": 1, "type": "string" }, "teams": { "type": "array", "items": { "$ref": "#/components/schemas/Team" }, "nullable": true } }, "additionalProperties": false }, "DepartmentRequest": { "type": "object", "properties": { "name": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Document": { "required": [ "employeeID", "issueDate" ], "type": "object", "properties": { "documentID": { "type": "integer", "format": "int32" }, "employeeID": { "type": "integer", "format": "int32" }, "issueDate": { "type": "string", "format": "date-time" }, "filename": { "type": "string", "nullable": true }, "uri": { "type": "string", "nullable": true }, "employee": { "$ref": "#/components/schemas/Employee" } }, "additionalProperties": false }, "DocumentEmployeeResponse": { "type": "object", "properties": { "documentID": { "type": "integer", "format": "int32" }, "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "issueDate": { "type": "string", "format": "date-time" }, "filename": { "type": "string", "nullable": true }, "uri": { "type": "string", "nullable": true } }, "additionalProperties": false }, "DocumentRequest": { "type": "object", "properties": { "employeeID": { "type": "integer", "format": "int32" }, "filename": { "type": "string", "nullable": true }, "issueDate": { "type": "string", "format": "date-time" }, "uri": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Employee": { "required": [ "city", "country", "dateOfEmployment", "email", "firstName", "lastName", "phone", "positionID", "postalCode", "street" ], "type": "object", "properties": { "employeeID": { "type": "integer", "format": "int32" }, "firstName": { "maxLength": 50, "minLength": 1, "type": "string" }, "lastName": { "maxLength": 50, "minLength": 1, "type": "string" }, "email": { "minLength": 1, "type": "string", "format": "email" }, "phone": { "minLength": 1, "type": "string", "format": "tel" }, "country": { "maxLength": 30, "minLength": 1, "type": "string" }, "city": { "maxLength": 30, "minLength": 1, "type": "string" }, "street": { "maxLength": 30, "minLength": 1, "type": "string" }, "postalCode": { "maxLength": 30, "minLength": 1, "type": "string" }, "dateOfEmployment": { "type": "string", "format": "date-time" }, "positionID": { "type": "integer", "format": "int32" }, "teamID": { "type": "integer", "format": "int32", "nullable": true }, "position": { "$ref": "#/components/schemas/Position" }, "team": { "$ref": "#/components/schemas/Team" }, "account": { "$ref": "#/components/schemas/Account" }, "photo": { "$ref": "#/components/schemas/Photo" }, "documents": { "type": "array", "items": { "$ref": "#/components/schemas/Document" }, "nullable": true }, "absences": { "type": "array", "items": { "$ref": "#/components/schemas/Absence" }, "nullable": true }, "authoredReports": { "type": "array", "items": { "$ref": "#/components/schemas/Report" }, "nullable": true }, "reportsAboutEmployee": { "type": "array", "items": { "$ref": "#/components/schemas/Report" }, "nullable": true } }, "additionalProperties": false }, "EmployeePositionTeamResponse": { "type": "object", "properties": { "employeeID": { "type": "integer", "format": "int32" }, "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "email": { "type": "string", "nullable": true }, "phone": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "city": { "type": "string", "nullable": true }, "street": { "type": "string", "nullable": true }, "postalCode": { "type": "string", "nullable": true }, "dateOfEmployment": { "type": "string", "format": "date-time" }, "positionID": { "type": "integer", "format": "int32" }, "positionName": { "type": "string", "nullable": true }, "positionDescription": { "type": "string", "nullable": true }, "teamID": { "type": "integer", "format": "int32" }, "teamName": { "type": "string", "nullable": true }, "teamDescription": { "type": "string", "nullable": true }, "departmentName": { "type": "string", "nullable": true }, "photo": { "$ref": "#/components/schemas/FileResponse" } }, "additionalProperties": false }, "EmployeeRequest": { "type": "object", "properties": { "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "email": { "type": "string", "nullable": true }, "phone": { "type": "string", "nullable": true }, "country": { "type": "string", "nullable": true }, "city": { "type": "string", "nullable": true }, "street": { "type": "string", "nullable": true }, "postalCode": { "type": "string", "nullable": true }, "dateOfEmployment": { "type": "string", "format": "date-time" }, "positionID": { "type": "integer", "format": "int32" }, "teamID": { "type": "integer", "format": "int32", "nullable": true } }, "additionalProperties": false }, "FileResponse": { "type": "object", "properties": { "fileID": { "type": "integer", "format": "int32" }, "filename": { "type": "string", "nullable": true }, "uri": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Photo": { "type": "object", "properties": { "photoID": { "type": "integer", "format": "int32" }, "filename": { "type": "string", "nullable": true }, "uri": { "type": "string", "nullable": true }, "employeeID": { "type": "integer", "format": "int32" }, "employee": { "$ref": "#/components/schemas/Employee" } }, "additionalProperties": false }, "PhotoRequest": { "type": "object", "properties": { "filename": { "type": "string", "nullable": true }, "uri": { "type": "string", "nullable": true }, "employeeID": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "Position": { "required": [ "positionName" ], "type": "object", "properties": { "positionID": { "type": "integer", "format": "int32" }, "positionName": { "maxLength": 50, "minLength": 1, "type": "string" }, "positionDescription": { "maxLength": 200, "type": "string", "nullable": true }, "employees": { "type": "array", "items": { "$ref": "#/components/schemas/Employee" }, "nullable": true } }, "additionalProperties": false }, "PositionRequest": { "type": "object", "properties": { "positionName": { "type": "string", "nullable": true }, "positionDescription": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Report": { "required": [ "authorID", "content", "employeeID", "severity", "title" ], "type": "object", "properties": { "reportID": { "type": "integer", "format": "int32" }, "title": { "maxLength": 100, "minLength": 1, "type": "string" }, "content": { "maxLength": 1000, "minLength": 1, "type": "string" }, "severity": { "$ref": "#/components/schemas/Severity" }, "result": { "maxLength": 200, "type": "boolean" }, "authorID": { "type": "integer", "format": "int32" }, "employeeID": { "type": "integer", "format": "int32" }, "author": { "$ref": "#/components/schemas/Employee" }, "employee": { "$ref": "#/components/schemas/Employee" } }, "additionalProperties": false }, "ReportEmployeeResponse": { "type": "object", "properties": { "title": { "type": "string", "nullable": true }, "content": { "type": "string", "format": "byte", "nullable": true }, "severity": { "$ref": "#/components/schemas/Severity" }, "result": { "type": "boolean" }, "authorFirstName": { "type": "string", "nullable": true }, "authorLastName": { "type": "string", "nullable": true }, "employeeFirstName": { "type": "string", "nullable": true }, "employeeLastName": { "type": "string", "nullable": true } }, "additionalProperties": false }, "ReportRequest": { "type": "object", "properties": { "title": { "type": "string", "nullable": true }, "content": { "type": "string", "nullable": true }, "severity": { "$ref": "#/components/schemas/Severity" }, "result": { "type": "boolean" }, "authorID": { "type": "integer", "format": "int32" }, "employeeID": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "Role": { "enum": [ "Admin", "HR", "Employee" ], "type": "string" }, "Severity": { "enum": [ "Cosmetic", "Minor", "Moderate", "Major", "Critical" ], "type": "string" }, "Status": { "enum": [ "Approved", "Pending", "Rejected" ], "type": "string" }, "Team": { "required": [ "teamName" ], "type": "object", "properties": { "teamID": { "type": "integer", "format": "int32" }, "teamName": { "maxLength": 50, "minLength": 1, "type": "string" }, "departmentID": { "type": "integer", "format": "int32" }, "teamDescription": { "maxLength": 200, "type": "string", "nullable": true }, "employees": { "type": "array", "items": { "$ref": "#/components/schemas/Employee" }, "nullable": true }, "department": { "$ref": "#/components/schemas/Department" } }, "additionalProperties": false }, "TeamDepartmentResponse": { "type": "object", "properties": { "teamID": { "type": "integer", "format": "int32" }, "teamName": { "type": "string", "nullable": true }, "teamDescription": { "type": "string", "nullable": true }, "departmentName": { "type": "string", "nullable": true } }, "additionalProperties": false }, "TeamRequest": { "type": "object", "properties": { "teamName": { "type": "string", "nullable": true }, "teamDescription": { "type": "string", "nullable": true }, "departmentID": { "type": "integer", "format": "int32" } }, "additionalProperties": false } }, "securitySchemes": { "Bearer": { "type": "http", "scheme": "Bearer", "bearerFormat": "JWT" } } }, "security": [ { "Bearer": [] } ] }