{"openapi":"3.0.1","info":{"title":"Task API","description":"API documentation for the Task Management application","version":"1.0"},"servers":[{"url":"https://mikhi-task-mgmt-java-sp-app.onrender.com","description":"Generated server url"}],"tags":[{"name":"Test Controller","description":"API for testing purposes"}],"paths":{"/v1/tasks/{id}":{"get":{"tags":["task-controller"],"summary":"Get task by ID","description":"Retrieves the details of a task by its ID","operationId":"getTaskById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoTask"}}}}}},"put":{"tags":["task-controller"],"summary":"Update a task by ID","description":"Updates the details of an existing task by its ID","operationId":"updateTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoTask"}}}}}},"delete":{"tags":["task-controller"],"summary":"Delete a task by ID","description":"Deletes a task by its ID and returns a confirmation message","operationId":"deleteTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoString"}}}}}}},"/v1/tasks":{"get":{"tags":["task-controller"],"summary":"Get all tasks","description":"Retrieves a list of all tasks","operationId":"getAllTasks","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoListTask"}}}}}},"post":{"tags":["task-controller"],"summary":"Create a new task","description":"Creates a new task and returns the created task details","operationId":"createTask","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoTask"}}}}}}},"/v1/test":{"get":{"tags":["Test Controller"],"summary":"Get test message","description":"Returns a simple 'Hello, World!' message","operationId":"getTasks","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v1/tasks/till-date":{"get":{"tags":["task-controller"],"summary":"Get tasks till a specific date","description":"Retrieves tasks with a due date up to the specified date","operationId":"getTasksTillDate","parameters":[{"name":"dueDate","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoListTask"}}}}}}},"/v1/tasks/paginated":{"get":{"tags":["task-controller"],"summary":"Get paginated tasks","description":"Retrieves tasks in a paginated format/page format with sorting options","operationId":"getAllTasksPaginated","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"dueDate"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"ASC","enum":["ASC","DESC"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoPageTask"}}}}}}},"/v1/tasks/filter":{"get":{"tags":["task-controller"],"summary":"Filter tasks","description":"Filters tasks based on Status and/or Due-date","operationId":"filterTasks","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"]}},{"name":"dueDate","in":"query","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDtoListTask"}}}}}}}},"components":{"schemas":{"Task":{"required":["title"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"]},"dueDate":{"type":"string","format":"date"}}},"ApiResponseDtoTask":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Task"},"success":{"type":"boolean"}}},"ApiResponseDtoListTask":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"success":{"type":"boolean"}}},"ApiResponseDtoPageTask":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/PageTask"},"success":{"type":"boolean"}}},"PageTask":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"first":{"type":"boolean"},"last":{"type":"boolean"},"empty":{"type":"boolean"}}},"PageableObject":{"type":"object","properties":{"offset":{"type":"integer","format":"int64"},"sort":{"$ref":"#/components/schemas/SortObject"},"paged":{"type":"boolean"},"unpaged":{"type":"boolean"},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"}}},"SortObject":{"type":"object","properties":{"empty":{"type":"boolean"},"unsorted":{"type":"boolean"},"sorted":{"type":"boolean"}}},"ApiResponseDtoString":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"string"},"success":{"type":"boolean"}}}}}}