|
16 | 16 | "servers" : [ { |
17 | 17 | "url" : "https://virtserver.swaggerhub.com/leogomesdev/Task_Management/1.0.0", |
18 | 18 | "description" : "SwaggerHub API Auto Mocking" |
| 19 | + }, { |
| 20 | + "url" : "http://localhost:3000", |
| 21 | + "description" : "Localhost" |
19 | 22 | } ], |
20 | 23 | "tags" : [ { |
21 | 24 | "name" : "task", |
|
258 | 261 | } |
259 | 262 | } |
260 | 263 | }, |
| 264 | + "400" : { |
| 265 | + "description" : "Bad request: validation exception", |
| 266 | + "content" : { |
| 267 | + "application/json" : { |
| 268 | + "examples" : { |
| 269 | + "Malformed UUID" : { |
| 270 | + "$ref" : "#/components/examples/ErrorInvalidUuid" |
| 271 | + } |
| 272 | + } |
| 273 | + } |
| 274 | + } |
| 275 | + }, |
261 | 276 | "401" : { |
262 | 277 | "description" : "Access token is missing or invalid" |
263 | 278 | }, |
|
297 | 312 | "200" : { |
298 | 313 | "description" : "OK" |
299 | 314 | }, |
| 315 | + "400" : { |
| 316 | + "description" : "Bad request: validation exception", |
| 317 | + "content" : { |
| 318 | + "application/json" : { |
| 319 | + "examples" : { |
| 320 | + "Malformed UUID" : { |
| 321 | + "$ref" : "#/components/examples/ErrorInvalidUuid" |
| 322 | + } |
| 323 | + } |
| 324 | + } |
| 325 | + } |
| 326 | + }, |
300 | 327 | "401" : { |
301 | 328 | "description" : "Access token is missing or invalid" |
302 | 329 | }, |
|
353 | 380 | "examples" : { |
354 | 381 | "A typo in status field" : { |
355 | 382 | "$ref" : "#/components/examples/ErrorInvalidStatus" |
| 383 | + }, |
| 384 | + "Malformed UUID" : { |
| 385 | + "$ref" : "#/components/examples/ErrorInvalidUuid" |
356 | 386 | } |
357 | 387 | } |
358 | 388 | } |
|
417 | 447 | "examples" : { |
418 | 448 | "A typo in status field" : { |
419 | 449 | "$ref" : "#/components/examples/ErrorInvalidStatus" |
| 450 | + }, |
| 451 | + "Malformed UUID" : { |
| 452 | + "$ref" : "#/components/examples/ErrorInvalidUuid" |
420 | 453 | } |
421 | 454 | } |
422 | 455 | } |
|
560 | 593 | "ErrorInvalidStatus" : { |
561 | 594 | "value" : { |
562 | 595 | "statusCode" : "400", |
563 | | - "message" : [ "\\\"DONEa\\\" is an invalid status. The allowed values are: OPEN,IN_PROGRESS,DONE" ], |
| 596 | + "messages" : [ "\\\"DONEa\\\" is an invalid status. The allowed values are: OPEN,IN_PROGRESS,DONE" ], |
564 | 597 | "error" : "Bad Request" |
565 | 598 | } |
566 | 599 | }, |
567 | 600 | "ErrorTaskNotFound" : { |
568 | 601 | "value" : { |
569 | 602 | "statusCode" : "404", |
570 | | - "message" : "Task with ID \\\"75f64cb1-a748-4115-9979-65dc056ce922\\\" not found", |
| 603 | + "messages" : [ "Task with ID \\\"75f64cb1-a748-4115-9979-65dc056ce922\\\" not found" ], |
571 | 604 | "error" : "Not Found" |
572 | 605 | } |
573 | 606 | }, |
574 | 607 | "ErrorUsernameAlreadyExists" : { |
575 | 608 | "value" : { |
576 | 609 | "statusCode" : "409", |
577 | | - "message" : "Username already exists", |
| 610 | + "messages" : [ "Username already exists" ], |
578 | 611 | "error" : "Conflict" |
579 | 612 | } |
580 | 613 | }, |
581 | 614 | "ErrorInvalidPassword" : { |
582 | 615 | "value" : { |
583 | 616 | "statusCode" : "400", |
584 | | - "message" : [ "password must contains: 1 upper case letter; 1 lower case letter; 1 number or special character", "password must be longer than or equal to 8 characters" ], |
| 617 | + "messages" : [ "password must contains: 1 upper case letter; 1 lower case letter; 1 number or special character", "password must be longer than or equal to 8 characters" ], |
585 | 618 | "error" : "Bad Request" |
586 | 619 | } |
587 | 620 | }, |
588 | 621 | "ErrorInvalidUsername" : { |
589 | 622 | "value" : { |
590 | 623 | "statusCode" : "400", |
591 | | - "message" : [ "username must be longer than or equal to 4 characters" ], |
| 624 | + "messages" : [ "username must be longer than or equal to 4 characters" ], |
592 | 625 | "error" : "Bad Request" |
593 | 626 | } |
594 | 627 | }, |
595 | 628 | "ErrorInvalidCredentials" : { |
596 | 629 | "value" : { |
597 | 630 | "statusCode" : "401", |
598 | | - "message" : "Invalid credentials", |
| 631 | + "messages" : [ "Invalid credentials" ], |
599 | 632 | "error" : "Unauthorized" |
600 | 633 | } |
| 634 | + }, |
| 635 | + "ErrorInvalidUuid" : { |
| 636 | + "value" : { |
| 637 | + "statusCode" : "400", |
| 638 | + "messages" : [ "Validation failed (uuid is expected)" ], |
| 639 | + "error" : "Bad Request" |
| 640 | + } |
601 | 641 | } |
602 | 642 | }, |
603 | 643 | "requestBodies" : { |
|
0 commit comments