{ "openapi": "3.0.1", "info": { "title": "api", "version": "v1" }, "paths": { "/api/todo/lists": { "get": { "tags": [ "Todo" ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TodoList" } } } } } }, "security": [ { "Bearer": [ ] } ] }, "post": { "tags": [ "Todo" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCreationRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ListCreationRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ListCreationRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoList" } } } } }, "security": [ { "Bearer": [ ] } ] } }, "/api/todo/lists/{id}": { "get": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoList" } } } } }, "security": [ { "Bearer": [ ] } ] }, "delete": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } }, "security": [ { "Bearer": [ ] } ] }, "put": { "tags": [ "Todo" ], "parameters": [ { "name": "Id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Payload" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Payload" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Payload" } } } }, "responses": { "200": { "description": "Success" } }, "security": [ { "Bearer": [ ] } ] } }, "/api/todo/items": { "post": { "tags": [ "Todo" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/TodoItem" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } } } } }, "security": [ { "Bearer": [ ] } ] }, "get": { "tags": [ "Todo" ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TodoItem" } } } } } }, "security": [ { "Bearer": [ ] } ] } }, "/api/todo/items/{id}": { "get": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } } } } }, "security": [ { "Bearer": [ ] } ] }, "delete": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success" } }, "security": [ { "Bearer": [ ] } ] }, "put": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } }, "text/json": { "schema": { "$ref": "#/components/schemas/TodoItem" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/TodoItem" } } } }, "responses": { "200": { "description": "Success" } }, "security": [ { "Bearer": [ ] } ] } } }, "components": { "schemas": { "ListCreationRequest": { "type": "object", "properties": { "name": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Payload": { "type": "object", "properties": { "name": { "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" }, "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 }, "TodoList": { "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 } }, "securitySchemes": { "Bearer": { "type": "http", "description": "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"", "scheme": "bearer", "bearerFormat": "JWT" } } } }