Skip to content

Commit 361b1fd

Browse files
committed
updated node-js sample
1 parent cc07172 commit 361b1fd

File tree

3 files changed

+1109
-54
lines changed

3 files changed

+1109
-54
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.3-SNAPSHOT
1+
2.4.19-SNAPSHOT

samples/server/petstore/nodejs/api/swagger.yaml

Lines changed: 33 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tags:
2929
description: "Find out more about our store"
3030
url: "http://swagger.io"
3131
schemes:
32-
- "http"
32+
- "https"
3333
paths:
3434
/pet:
3535
post:
@@ -52,14 +52,13 @@ paths:
5252
schema:
5353
$ref: "#/definitions/Pet"
5454
responses:
55-
405:
55+
"405":
5656
description: "Invalid input"
5757
security:
5858
- petstore_auth:
5959
- "write:pets"
6060
- "read:pets"
6161
x-swagger-router-controller: "Pet"
62-
x-is-post-method: true
6362
put:
6463
tags:
6564
- "pet"
@@ -80,18 +79,17 @@ paths:
8079
schema:
8180
$ref: "#/definitions/Pet"
8281
responses:
83-
400:
82+
"400":
8483
description: "Invalid ID supplied"
85-
404:
84+
"404":
8685
description: "Pet not found"
87-
405:
86+
"405":
8887
description: "Validation exception"
8988
security:
9089
- petstore_auth:
9190
- "write:pets"
9291
- "read:pets"
9392
x-swagger-router-controller: "Pet"
94-
x-is-put-method: true
9593
/pet/findByStatus:
9694
get:
9795
tags:
@@ -110,27 +108,26 @@ paths:
110108
type: "array"
111109
items:
112110
type: "string"
113-
default: "available"
114111
enum:
115112
- "available"
116113
- "pending"
117114
- "sold"
115+
default: "available"
118116
collectionFormat: "csv"
119117
responses:
120-
200:
118+
"200":
121119
description: "successful operation"
122120
schema:
123121
type: "array"
124122
items:
125123
$ref: "#/definitions/Pet"
126-
400:
124+
"400":
127125
description: "Invalid status value"
128126
security:
129127
- petstore_auth:
130128
- "write:pets"
131129
- "read:pets"
132130
x-swagger-router-controller: "Pet"
133-
x-is-get-method: true
134131
/pet/findByTags:
135132
get:
136133
tags:
@@ -152,21 +149,20 @@ paths:
152149
type: "string"
153150
collectionFormat: "csv"
154151
responses:
155-
200:
152+
"200":
156153
description: "successful operation"
157154
schema:
158155
type: "array"
159156
items:
160157
$ref: "#/definitions/Pet"
161-
400:
158+
"400":
162159
description: "Invalid tag value"
163160
security:
164161
- petstore_auth:
165162
- "write:pets"
166163
- "read:pets"
167164
deprecated: true
168165
x-swagger-router-controller: "Pet"
169-
x-is-get-method: true
170166
/pet/{petId}:
171167
get:
172168
tags:
@@ -185,18 +181,17 @@ paths:
185181
type: "integer"
186182
format: "int64"
187183
responses:
188-
200:
184+
"200":
189185
description: "successful operation"
190186
schema:
191187
$ref: "#/definitions/Pet"
192-
400:
188+
"400":
193189
description: "Invalid ID supplied"
194-
404:
190+
"404":
195191
description: "Pet not found"
196192
security:
197193
- api_key: []
198194
x-swagger-router-controller: "Pet"
199-
x-is-get-method: true
200195
post:
201196
tags:
202197
- "pet"
@@ -226,14 +221,13 @@ paths:
226221
required: false
227222
type: "string"
228223
responses:
229-
405:
224+
"405":
230225
description: "Invalid input"
231226
security:
232227
- petstore_auth:
233228
- "write:pets"
234229
- "read:pets"
235230
x-swagger-router-controller: "Pet"
236-
x-is-post-method: true
237231
delete:
238232
tags:
239233
- "pet"
@@ -255,14 +249,13 @@ paths:
255249
type: "integer"
256250
format: "int64"
257251
responses:
258-
400:
252+
"400":
259253
description: "Invalid pet value"
260254
security:
261255
- petstore_auth:
262256
- "write:pets"
263257
- "read:pets"
264258
x-swagger-router-controller: "Pet"
265-
x-is-delete-method: true
266259
/pet/{petId}/uploadImage:
267260
post:
268261
tags:
@@ -292,7 +285,7 @@ paths:
292285
required: false
293286
type: "file"
294287
responses:
295-
200:
288+
"200":
296289
description: "successful operation"
297290
schema:
298291
$ref: "#/definitions/ApiResponse"
@@ -301,7 +294,6 @@ paths:
301294
- "write:pets"
302295
- "read:pets"
303296
x-swagger-router-controller: "Pet"
304-
x-is-post-method: true
305297
/store/inventory:
306298
get:
307299
tags:
@@ -313,7 +305,7 @@ paths:
313305
- "application/json"
314306
parameters: []
315307
responses:
316-
200:
308+
"200":
317309
description: "successful operation"
318310
schema:
319311
type: "object"
@@ -323,7 +315,6 @@ paths:
323315
security:
324316
- api_key: []
325317
x-swagger-router-controller: "Store"
326-
x-is-get-method: true
327318
/store/order:
328319
post:
329320
tags:
@@ -342,14 +333,13 @@ paths:
342333
schema:
343334
$ref: "#/definitions/Order"
344335
responses:
345-
200:
336+
"200":
346337
description: "successful operation"
347338
schema:
348339
$ref: "#/definitions/Order"
349-
400:
340+
"400":
350341
description: "Invalid Order"
351342
x-swagger-router-controller: "Store"
352-
x-is-post-method: true
353343
/store/order/{orderId}:
354344
get:
355345
tags:
@@ -371,16 +361,15 @@ paths:
371361
minimum: 1
372362
format: "int64"
373363
responses:
374-
200:
364+
"200":
375365
description: "successful operation"
376366
schema:
377367
$ref: "#/definitions/Order"
378-
400:
368+
"400":
379369
description: "Invalid ID supplied"
380-
404:
370+
"404":
381371
description: "Order not found"
382372
x-swagger-router-controller: "Store"
383-
x-is-get-method: true
384373
delete:
385374
tags:
386375
- "store"
@@ -398,12 +387,11 @@ paths:
398387
required: true
399388
type: "string"
400389
responses:
401-
400:
390+
"400":
402391
description: "Invalid ID supplied"
403-
404:
392+
"404":
404393
description: "Order not found"
405394
x-swagger-router-controller: "Store"
406-
x-is-delete-method: true
407395
/user:
408396
post:
409397
tags:
@@ -425,7 +413,6 @@ paths:
425413
default:
426414
description: "successful operation"
427415
x-swagger-router-controller: "User"
428-
x-is-post-method: true
429416
/user/createWithArray:
430417
post:
431418
tags:
@@ -449,7 +436,6 @@ paths:
449436
default:
450437
description: "successful operation"
451438
x-swagger-router-controller: "User"
452-
x-is-post-method: true
453439
/user/createWithList:
454440
post:
455441
tags:
@@ -473,7 +459,6 @@ paths:
473459
default:
474460
description: "successful operation"
475461
x-swagger-router-controller: "User"
476-
x-is-post-method: true
477462
/user/login:
478463
get:
479464
tags:
@@ -496,7 +481,7 @@ paths:
496481
required: true
497482
type: "string"
498483
responses:
499-
200:
484+
"200":
500485
description: "successful operation"
501486
headers:
502487
X-Rate-Limit:
@@ -509,10 +494,9 @@ paths:
509494
description: "date in UTC when toekn expires"
510495
schema:
511496
type: "string"
512-
400:
497+
"400":
513498
description: "Invalid username/password supplied"
514499
x-swagger-router-controller: "User"
515-
x-is-get-method: true
516500
/user/logout:
517501
get:
518502
tags:
@@ -528,7 +512,6 @@ paths:
528512
default:
529513
description: "successful operation"
530514
x-swagger-router-controller: "User"
531-
x-is-get-method: true
532515
/user/{username}:
533516
get:
534517
tags:
@@ -546,16 +529,15 @@ paths:
546529
required: true
547530
type: "string"
548531
responses:
549-
200:
532+
"200":
550533
description: "successful operation"
551534
schema:
552535
$ref: "#/definitions/User"
553-
400:
536+
"400":
554537
description: "Invalid username supplied"
555-
404:
538+
"404":
556539
description: "User not found"
557540
x-swagger-router-controller: "User"
558-
x-is-get-method: true
559541
put:
560542
tags:
561543
- "user"
@@ -578,12 +560,11 @@ paths:
578560
schema:
579561
$ref: "#/definitions/User"
580562
responses:
581-
400:
563+
"400":
582564
description: "Invalid user supplied"
583-
404:
565+
"404":
584566
description: "User not found"
585567
x-swagger-router-controller: "User"
586-
x-is-put-method: true
587568
delete:
588569
tags:
589570
- "user"
@@ -600,12 +581,11 @@ paths:
600581
required: true
601582
type: "string"
602583
responses:
603-
400:
584+
"400":
604585
description: "Invalid username supplied"
605-
404:
586+
"404":
606587
description: "User not found"
607588
x-swagger-router-controller: "User"
608-
x-is-delete-method: true
609589
securityDefinitions:
610590
petstore_auth:
611591
type: "oauth2"

0 commit comments

Comments
 (0)