Skip to content

Commit a5381eb

Browse files
committed
Improved API response objects
1 parent 1ac4b7b commit a5381eb

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

openapi/vAPI.yaml

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.1
22
info:
3-
title: defaultTitle
4-
description: defaultDescription
3+
title: Vulnerable API
4+
description: Vulnerable API
55
version: '0.1'
66
paths:
77
/:
@@ -11,7 +11,7 @@ paths:
1111
operationId: get_root
1212
responses:
1313
'200':
14-
description: Auto generated using Swagger Inspector
14+
description: API status results
1515
content:
1616
application/json; charset=UTF-8:
1717
schema:
@@ -47,8 +47,24 @@ paths:
4747
examples: {}
4848
'400':
4949
description: Invalid input
50+
content:
51+
application/problem+json; charset=UTF-8:
52+
schema:
53+
type: string
5054
'401':
5155
description: Unauthorized
56+
content:
57+
application/json; charset=UTF-8:
58+
schema:
59+
type: string
60+
examples:
61+
'0':
62+
value: |-
63+
{
64+
"error": {
65+
"message": "username not found"
66+
}
67+
}
5268
/user/{user}:
5369
get:
5470
x-openapi-router-controller: vAPI
@@ -88,12 +104,28 @@ paths:
88104
not found"}}}
89105
'400':
90106
description: Invalid input
107+
content:
108+
application/problem+json; charset=UTF-8:
109+
schema:
110+
type: string
91111
'401':
92112
description: Unauthenticated
113+
content:
114+
application/json; charset=UTF-8:
115+
schema:
116+
type: string
93117
'403':
94118
description: Unauthorized
119+
content:
120+
application/json; charset=UTF-8:
121+
schema:
122+
type: string
95123
'404':
96124
description: Not found
125+
content:
126+
application/json; charset=UTF-8:
127+
schema:
128+
type: string
97129
/user:
98130
post:
99131
description: Auto generated using Swagger Inspector
@@ -140,10 +172,22 @@ paths:
140172
{"response": {"error": {"message": "must provide valid admin token"}}}
141173
'400':
142174
description: Invalid input
175+
content:
176+
application/json; charset=UTF-8:
177+
schema:
178+
type: string
143179
'401':
144180
description: Unauthenticated
181+
content:
182+
application/json; charset=UTF-8:
183+
schema:
184+
type: string
145185
'403':
146186
description: Unauthorized
187+
content:
188+
application/json; charset=UTF-8:
189+
schema:
190+
type: string
147191
/uptime:
148192
get:
149193
x-openapi-router-controller: vAPI
@@ -178,6 +222,10 @@ paths:
178222
examples: {}
179223
'404':
180224
description: Not found
225+
content:
226+
application/json; charset=UTF-8:
227+
schema:
228+
type: string
181229
/widget:
182230
post:
183231
description: Make widget reservation
@@ -211,7 +259,19 @@ paths:
211259
examples: {}
212260
'400':
213261
description: Invalid input
262+
content:
263+
application/problem+json; charset=UTF-8:
264+
schema:
265+
type: string
214266
'401':
215267
description: Unauthenticated
268+
content:
269+
application/json; charset=UTF-8:
270+
schema:
271+
type: string
216272
'403':
217273
description: Unauthorized
274+
content:
275+
application/json; charset=UTF-8:
276+
schema:
277+
type: string

0 commit comments

Comments
 (0)