-
Notifications
You must be signed in to change notification settings - Fork 8
/
openapi.yaml
127 lines (118 loc) · 2.83 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
openapi: 3.0.3
info:
title: デモ用 API
version: 1.0.0
tags:
- name: Task
description: タスク API
paths:
/api/tasks:
description: タスクを全て返す
get:
operationId: list-tasks
responses:
200:
description: 200 Response
content:
application/json:
schema:
type: object
properties:
tasks:
type: array
items:
$ref: '#/components/schemas/Task'
required:
- tasks
tags:
- Task
post:
operationId: create-task
responses:
201:
description: 201 Response
content:
application/json:
schema:
type: object
properties:
task:
$ref: '#/components/schemas/Task'
required:
- task
tags:
- Task
/api/tasks/{task_id}:
parameters:
- name: task_id
in: path
description: タスク ID
required: true
schema:
type: string
example: clhljirua000034c49r2mf1t7
patch:
operationId: update-task
requestBody:
content:
application/json:
schema:
type: object
properties:
title:
type: string
description: タイトル
example: 犬の散歩に行く
finishedAt:
type: string
description: 完了日時
example: 2023-05-13T05:22:12.040Z
nullable: true
responses:
200:
description: 200 Response
content:
application/json:
schema:
type: object
properties:
task:
$ref: '#/components/schemas/Task'
required:
- task
tags:
- Task
delete:
operationId: delete-task
responses:
204:
description: 204 Response
tags:
- Task
components:
schemas:
Task:
type: object
properties:
id:
type: string
description: ID (CUID)
example: clhljirua000034c49r2mf1t7
title:
type: string
description: タイトル
example: 犬の散歩に行く
createdAt:
type: string
description: 作成日時
example: 2023-05-13T05:22:04.018Z
finishedAt:
type: string
description: 完了日時
example: 2023-05-13T05:22:12.040Z
nullable: true
required:
- id
- title
- createdAt
- finishedAt