{ "openapi": "3.0.1", "info": { "title": "api", "version": "v1" }, "paths": { "/api/todo/lists": { "get": { "tags": [ "api" ], "operationId": "GetAllLists", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GetListResponse" } } } } } } }, "post": { "tags": [ "api" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateListRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetListResponse" } } } } } } }, "/api/todo/lists/{Id}": { "get": { "tags": [ "api" ], "operationId": "GetList", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "name": "Tag", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "Compleated", "in": "query", "schema": { "type": "boolean" } }, { "name": "IncludeSubtasks", "in": "query", "schema": { "type": "boolean" } }, { "name": "Page", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "PageSize", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetListResponse" } } } }, "404": { "description": "Not Found" } } }, "delete": { "tags": [ "api" ], "operationId": "DeleteList", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" }, "404": { "description": "Not Found" } } }, "put": { "tags": [ "api" ], "operationId": "RenameList", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListRenameRequest" } } }, "required": true }, "responses": { "200": { "description": "Success" }, "404": { "description": "Not Found" } } } }, "/api/todo/items": { "post": { "tags": [ "api" ], "operationId": "CreateTask", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaskRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } } } }, "400": { "description": "Bad Request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "get": { "tags": [ "api" ], "operationId": "GetAllTasks", "parameters": [ { "name": "Tag", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "Completed", "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TodoItem" } } } } } } } }, "/api/todo/items/{Id}": { "get": { "tags": [ "api" ], "operationId": "GetTask", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } } } }, "404": { "description": "Not Found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "delete": { "tags": [ "api" ], "operationId": "DeleteTask", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" }, "404": { "description": "Not Found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "put": { "tags": [ "api" ], "operationId": "UpdateTask", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } } }, "required": true }, "responses": { "200": { "description": "Success" }, "404": { "description": "Not Found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/api/todo/tags": { "post": { "tags": [ "api" ], "operationId": "CreateTag", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTagRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Tag" } } } } } }, "get": { "tags": [ "api" ], "operationId": "GetAllTags", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } } } } } } } }, "/api/todo/tags/{Id}": { "get": { "tags": [ "api" ], "operationId": "GetTag", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Tag" } } } }, "404": { "description": "Not Found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "put": { "tags": [ "api" ], "operationId": "UpdateTag", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTagRequest" } } }, "required": true }, "responses": { "200": { "description": "Success" }, "404": { "description": "Not Found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "delete": { "tags": [ "api" ], "operationId": "DeleteTag", "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" }, "404": { "description": "Not Found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } } }, "components": { "schemas": { "CreateListRequest": { "type": "object", "properties": { "name": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CreateTagRequest": { "type": "object", "properties": { "name": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CreateTaskRequest": { "type": "object", "properties": { "listId": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "deadline": { "type": "string", "format": "date-time", "nullable": true }, "notes": { "type": "string", "nullable": true }, "tags": { "type": "array", "items": { "type": "string" }, "nullable": true }, "subtasks": { "type": "array", "items": { "$ref": "#/components/schemas/Subtask" }, "nullable": true } }, "additionalProperties": false }, "GetListResponse": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/TodoItem" }, "nullable": true } }, "additionalProperties": false }, "ListRenameRequest": { "type": "object", "properties": { "name": { "type": "string", "nullable": true } }, "additionalProperties": false }, "ProblemDetails": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32", "nullable": true }, "detail": { "type": "string", "nullable": true }, "instance": { "type": "string", "nullable": true } }, "additionalProperties": { } }, "Subtask": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "deadline": { "type": "string", "format": "date-time", "nullable": true }, "notes": { "type": "string", "nullable": true }, "tags": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "Tag": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true } }, "additionalProperties": false }, "TodoItem": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "nullable": true }, "name": { "type": "string", "nullable": true }, "completed": { "type": "boolean" }, "deadline": { "type": "string", "format": "date-time", "nullable": true }, "notes": { "type": "string", "nullable": true }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" }, "nullable": true }, "subtasks": { "type": "array", "items": { "$ref": "#/components/schemas/TodoItem" }, "nullable": true }, "listId": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "UpdateTagRequest": { "type": "object", "properties": { "name": { "type": "string", "nullable": true } }, "additionalProperties": false } }, "securitySchemes": { "Bearer": { "type": "http", "description": "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "Bearer": [ ] } ] }