{ "openapi": "3.0.1", "info": { "title": "api | v1", "version": "1.0.0" }, "paths": { "/api/v1/Todo": { "get": { "tags": [ "Todo" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodosResponse" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { } } } } }, "post": { "tags": [ "Todo" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTodoRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CreateTodoRequest" } } }, "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationProblemDetails" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { } } } } } }, "/api/v1/Todo/{id}": { "get": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TodoResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { } } } } }, "patch": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTodoRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/UpdateTodoRequest" } } }, "required": true }, "responses": { "204": { "description": "No Content", "content": { "application/json": { } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationProblemDetails" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { } } } } }, "delete": { "tags": [ "Todo" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { } } } } } }, "/api/v1/Todo/reorder": { "put": { "tags": [ "Todo" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReorderTodosRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ReorderTodosRequest" } } }, "required": true }, "responses": { "204": { "description": "No Content", "content": { "application/json": { } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationProblemDetails" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { } } } } } } }, "components": { "schemas": { "CreateTodoRequest": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string", "nullable": true } } }, "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 } } }, "ReorderTodoDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "position": { "type": "integer", "format": "int32" } } }, "ReorderTodosRequest": { "type": "object", "properties": { "todos": { "type": "array", "items": { "$ref": "#/components/schemas/ReorderTodoDto" } } } }, "TodoResponse": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "completed": { "type": "boolean" }, "position": { "type": "integer", "format": "int32" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "TodosResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/TodoResponse" } }, "totalCount": { "type": "integer", "format": "int32" } } }, "UpdateTodoRequest": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "completed": { "type": "boolean", "nullable": true } } }, "ValidationProblemDetails": { "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 }, "errors": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } } } } } }, "tags": [ { "name": "Todo" } ] }