You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
915 B
JSON
44 lines
915 B
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "Todo API",
|
|
"version": "1.0.0"
|
|
},
|
|
"paths": {
|
|
"/api/v1/todo": {
|
|
"post": {
|
|
"summary": "Create a todo item",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TodoRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Todo item created"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"TodoRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"completed": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": ["title"]
|
|
}
|
|
}
|
|
}
|
|
} |