-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yml
202 lines (202 loc) · 4.84 KB
/
api.yml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
openapi: 3.0.1
info:
title: TODO App
description: TODO Service offers CRUD operations on managing TODO items. You can add, list, update via various endpoints exposed.
termsOfService: http://swagger.io/terms/
contact:
email: gargnipungarg@gmail.com
version: 1.0.0
externalDocs:
description: Repository
url: https://github.com/gargnipungarg/todo-app
servers:
- url: https://localhost/todoservicev1/todos
- url: http://localhost/todoservicev1/todos
tags:
- name: user
description: Nipun
- name: project
description: TODO API
paths:
/add:
post:
tags:
- postItem
summary: Add a new todo item
description: Add a new todo item
operationId: postItem
requestBody:
description: TODO Item Model
content:
application/json:
schema:
$ref: '#/components/schemas/TodoAddItemRequest'
required: true
responses:
202:
description: Accepted
content: {}
400:
description: Bad request
content: {}
x-codegen-request-body-name: body
/updateDesc:
post:
tags:
- updateDesc
summary: Update description of an item
description: Update description of an item
operationId: updateDesc
requestBody:
description: Update description of an item
content:
application/json:
schema:
$ref: '#/components/schemas/TodoUpdateDescRequest'
required: true
responses:
200:
description: Ok
content: {}
400:
description: Bad request
content: {}
x-codegen-request-body-name: body
/markDone:
post:
tags:
- markDone
summary: Mark done to an item
description: Mark done to an item
operationId: markDone
parameters:
- name: id
in: query
description: id
required: true
schema:
type: integer
format: int64
responses:
200:
description: Ok
content: {}
400:
description: Bad request
content: {}
/markNotDone:
post:
tags:
- markNotDone
summary: Mark not done to an item
description: Mark not done to an item
operationId: markNotDone
parameters:
- name: id
in: query
description: id
required: true
schema:
type: integer
format: int64
responses:
200:
description: Ok
content: {}
400:
description: Bad request
content: {}
/:
get:
tags:
- getTODO
summary: Get details of an item
description: Get details of an item
operationId: getTODO
parameters:
- name: id
in: query
description: id
required: true
schema:
type: integer
format: int64
responses:
200:
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/TODOEntity'
400:
description: Bad request
content: {}
/list:
get:
tags:
- list
summary: List of all items or with filter of status of not done
description: List of all items or with filter of status of not done
operationId: list
parameters:
- name: notDone
in: query
description: notDone flag for not done filter of statuses
schema:
type: boolean
responses:
200:
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/ListTodoEntity'
400:
description: Bad request
content: {}
components:
schemas:
ListTodoEntity:
type: array
items:
$ref: '#/components/schemas/TODOEntity'
TodoAddItemRequest:
type: object
properties:
description:
type: string
dueDate:
type: string
format: date-time
TodoUpdateDescRequest:
type: object
properties:
description:
type: string
id:
type: integer
format: int64
TODOEntity:
type: object
properties:
id:
type: integer
format: int64
description:
type: string
status:
type: string
description: "Status can be - Done, Not done, and Past Due"
enum:
- "Past Due"
- "Done"
- "Not Done"
dueDate:
type: string
format: date-time
creationDate:
type: string
format: date-time
completionDate:
type: string
format: date-time