2021-02-16 00:39:09 +03:00
|
|
|
openapi: 3.0.0
|
|
|
|
info:
|
|
|
|
title: "Todo API"
|
|
|
|
version: "1.0.0"
|
2021-09-14 18:11:47 +03:00
|
|
|
servers:
|
|
|
|
- url: https://mytodos.doesnotexist/
|
|
|
|
description: Core
|
2021-02-16 00:39:09 +03:00
|
|
|
paths:
|
2023-12-19 22:17:08 +03:00
|
|
|
/todos:
|
2021-02-16 00:39:09 +03:00
|
|
|
get:
|
2021-05-31 06:35:18 +03:00
|
|
|
description: Return a list of Todo entities
|
2021-03-03 17:34:07 +03:00
|
|
|
operationId: todos_ListTodos
|
2021-02-16 00:39:09 +03:00
|
|
|
parameters:
|
2023-12-19 22:17:08 +03:00
|
|
|
- name: active
|
|
|
|
in: query
|
|
|
|
schema:
|
|
|
|
type: boolean
|
|
|
|
- name: keyword
|
|
|
|
in: query
|
|
|
|
schema:
|
|
|
|
type: string
|
2021-02-16 00:39:09 +03:00
|
|
|
responses:
|
2023-12-19 22:17:08 +03:00
|
|
|
"200":
|
2021-02-16 00:39:09 +03:00
|
|
|
description: OK
|
2021-02-28 19:08:29 +03:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
title: collectionTodos
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
value:
|
2021-05-31 06:35:18 +03:00
|
|
|
type: array
|
2023-12-19 22:17:08 +03:00
|
|
|
items:
|
2021-02-28 19:08:29 +03:00
|
|
|
$ref: "#/components/schemas/todo"
|
|
|
|
|
2021-02-16 00:39:09 +03:00
|
|
|
post:
|
2021-05-21 22:20:02 +03:00
|
|
|
requestBody:
|
|
|
|
description: New Todo
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-12-19 22:17:08 +03:00
|
|
|
$ref: "#/components/schemas/NewTodo"
|
2021-05-21 22:20:02 +03:00
|
|
|
required: true
|
2021-02-16 00:39:09 +03:00
|
|
|
responses:
|
2023-12-19 22:17:08 +03:00
|
|
|
"201":
|
2021-02-16 00:39:09 +03:00
|
|
|
description: OK
|
|
|
|
/todos/{todoId}:
|
|
|
|
get:
|
2021-05-31 06:35:18 +03:00
|
|
|
description: Return a single Todo object
|
2021-02-16 00:39:09 +03:00
|
|
|
responses:
|
2023-12-19 22:17:08 +03:00
|
|
|
"200":
|
2021-02-16 00:39:09 +03:00
|
|
|
description: OK
|
|
|
|
delete:
|
2021-05-31 06:35:18 +03:00
|
|
|
description: Delete a single Todo object
|
2021-02-16 00:39:09 +03:00
|
|
|
responses:
|
2023-12-19 22:17:08 +03:00
|
|
|
"200":
|
2021-02-16 00:39:09 +03:00
|
|
|
description: OK
|
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
todo:
|
2021-05-31 22:26:02 +03:00
|
|
|
title: Todo
|
2021-02-16 00:39:09 +03:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
subject:
|
|
|
|
type: string
|
2022-09-09 18:22:50 +03:00
|
|
|
Notes:
|
|
|
|
type: string
|
2023-12-19 22:17:08 +03:00
|
|
|
NewTodo:
|
|
|
|
title: NewTodo
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
subject:
|
|
|
|
type: string
|
|
|
|
Notes:
|
|
|
|
type: string
|