|
42 | 42 | "summary": "Mock a get request for SDK tests", |
43 | 43 | "operationId": "barGet", |
44 | 44 | "consumes": ["application/json"], |
45 | | - "produces": [], |
| 45 | + "produces": ["application/json"], |
46 | 46 | "tags": ["bar"], |
47 | 47 | "description": "", |
48 | 48 | "responses": { |
49 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 49 | + "200": { |
| 50 | + "description": "Mock", |
| 51 | + "schema": { "$ref": "#/definitions/mock" } |
| 52 | + } |
50 | 53 | }, |
51 | 54 | "x-appwrite": { |
52 | 55 | "method": "get", |
|
95 | 98 | "summary": "Mock a post request for SDK tests", |
96 | 99 | "operationId": "barPost", |
97 | 100 | "consumes": ["application/json"], |
98 | | - "produces": [], |
| 101 | + "produces": ["application/json"], |
99 | 102 | "tags": ["bar"], |
100 | 103 | "description": "", |
101 | 104 | "responses": { |
102 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 105 | + "200": { |
| 106 | + "description": "Mock", |
| 107 | + "schema": { "$ref": "#/definitions/mock" } |
| 108 | + } |
103 | 109 | }, |
104 | 110 | "x-appwrite": { |
105 | 111 | "method": "post", |
|
152 | 158 | "summary": "Mock a put request for SDK tests", |
153 | 159 | "operationId": "barPut", |
154 | 160 | "consumes": ["application/json"], |
155 | | - "produces": [], |
| 161 | + "produces": ["application/json"], |
156 | 162 | "tags": ["bar"], |
157 | 163 | "description": "", |
158 | 164 | "responses": { |
159 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 165 | + "200": { |
| 166 | + "description": "Mock", |
| 167 | + "schema": { "$ref": "#/definitions/mock" } |
| 168 | + } |
160 | 169 | }, |
161 | 170 | "x-appwrite": { |
162 | 171 | "method": "put", |
|
209 | 218 | "summary": "Mock a patch request for SDK tests", |
210 | 219 | "operationId": "barPatch", |
211 | 220 | "consumes": ["application/json"], |
212 | | - "produces": [], |
| 221 | + "produces": ["application/json"], |
213 | 222 | "tags": ["bar"], |
214 | 223 | "description": "", |
215 | 224 | "responses": { |
216 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 225 | + "200": { |
| 226 | + "description": "Mock", |
| 227 | + "schema": { "$ref": "#/definitions/mock" } |
| 228 | + } |
217 | 229 | }, |
218 | 230 | "x-appwrite": { |
219 | 231 | "method": "patch", |
|
266 | 278 | "summary": "Mock a delete request for SDK tests", |
267 | 279 | "operationId": "barDelete", |
268 | 280 | "consumes": ["application/json"], |
269 | | - "produces": [], |
| 281 | + "produces": ["application/json"], |
270 | 282 | "tags": ["bar"], |
271 | 283 | "description": "", |
272 | 284 | "responses": { |
273 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 285 | + "200": { |
| 286 | + "description": "Mock", |
| 287 | + "schema": { "$ref": "#/definitions/mock" } |
| 288 | + } |
274 | 289 | }, |
275 | 290 | "x-appwrite": { |
276 | 291 | "method": "delete", |
|
325 | 340 | "summary": "Mock a get request for SDK tests", |
326 | 341 | "operationId": "fooGet", |
327 | 342 | "consumes": ["application/json"], |
328 | | - "produces": [], |
| 343 | + "produces": ["application/json"], |
329 | 344 | "tags": ["foo"], |
330 | 345 | "description": "", |
331 | 346 | "responses": { |
332 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 347 | + "200": { |
| 348 | + "description": "Mock", |
| 349 | + "schema": { "$ref": "#/definitions/mock" } |
| 350 | + } |
333 | 351 | }, |
334 | 352 | "x-appwrite": { |
335 | 353 | "method": "get", |
|
378 | 396 | "summary": "Mock a post request for SDK tests", |
379 | 397 | "operationId": "fooPost", |
380 | 398 | "consumes": ["application/json"], |
381 | | - "produces": [], |
| 399 | + "produces": ["application/json"], |
382 | 400 | "tags": ["foo"], |
383 | 401 | "description": "", |
384 | 402 | "responses": { |
385 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 403 | + "200": { |
| 404 | + "description": "Mock", |
| 405 | + "schema": { "$ref": "#/definitions/mock" } |
| 406 | + } |
386 | 407 | }, |
387 | 408 | "x-appwrite": { |
388 | 409 | "method": "post", |
|
435 | 456 | "summary": "Mock a put request for SDK tests", |
436 | 457 | "operationId": "fooPut", |
437 | 458 | "consumes": ["application/json"], |
438 | | - "produces": [], |
| 459 | + "produces": ["application/json"], |
439 | 460 | "tags": ["foo"], |
440 | 461 | "description": "", |
441 | 462 | "responses": { |
442 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 463 | + "200": { |
| 464 | + "description": "Mock", |
| 465 | + "schema": { "$ref": "#/definitions/mock" } |
| 466 | + } |
443 | 467 | }, |
444 | 468 | "x-appwrite": { |
445 | 469 | "method": "put", |
|
492 | 516 | "summary": "Mock a patch request for SDK tests", |
493 | 517 | "operationId": "fooPatch", |
494 | 518 | "consumes": ["application/json"], |
495 | | - "produces": [], |
| 519 | + "produces": ["application/json"], |
496 | 520 | "tags": ["foo"], |
497 | 521 | "description": "", |
498 | 522 | "responses": { |
499 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 523 | + "200": { |
| 524 | + "description": "Mock", |
| 525 | + "schema": { "$ref": "#/definitions/mock" } |
| 526 | + } |
500 | 527 | }, |
501 | 528 | "x-appwrite": { |
502 | 529 | "method": "patch", |
|
549 | 576 | "summary": "Mock a delete request for SDK tests", |
550 | 577 | "operationId": "fooDelete", |
551 | 578 | "consumes": ["application/json"], |
552 | | - "produces": [], |
| 579 | + "produces": ["application/json"], |
553 | 580 | "tags": ["foo"], |
554 | 581 | "description": "", |
555 | 582 | "responses": { |
556 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 583 | + "200": { |
| 584 | + "description": "Mock", |
| 585 | + "schema": { "$ref": "#/definitions/mock" } |
| 586 | + } |
557 | 587 | }, |
558 | 588 | "x-appwrite": { |
559 | 589 | "method": "delete", |
|
605 | 635 | }, |
606 | 636 | "/mock/tests/general/400-error": { |
607 | 637 | "get": { |
608 | | - "summary": "Mock a an 400 failed request", |
| 638 | + "summary": "400 Error", |
609 | 639 | "operationId": "generalError400", |
610 | 640 | "consumes": ["application/json"], |
611 | | - "produces": [], |
| 641 | + "produces": ["application/json"], |
612 | 642 | "tags": ["general"], |
613 | 643 | "description": "", |
614 | 644 | "responses": { |
615 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 645 | + "400": { |
| 646 | + "description": "Error", |
| 647 | + "schema": { "$ref": "#/definitions/error" } |
| 648 | + } |
616 | 649 | }, |
617 | 650 | "x-appwrite": { |
618 | 651 | "method": "error400", |
619 | 652 | "weight": 185, |
620 | 653 | "cookies": false, |
621 | 654 | "type": "", |
622 | 655 | "demo": "general/error400.md", |
623 | | - "edit": "https://github.com/appwrite/appwrite/edit/masterMock an 400 error", |
| 656 | + "edit": "https://github.com/appwrite/appwrite/edit/masterMock a an 400 failed request.", |
624 | 657 | "rate-limit": 0, |
625 | 658 | "rate-time": 3600, |
626 | 659 | "rate-key": "url:{url},ip:{ip}", |
|
633 | 666 | }, |
634 | 667 | "/mock/tests/general/500-error": { |
635 | 668 | "get": { |
636 | | - "summary": "Mock a an 500 failed request", |
| 669 | + "summary": "500 Error", |
637 | 670 | "operationId": "generalError500", |
638 | 671 | "consumes": ["application/json"], |
639 | | - "produces": [], |
| 672 | + "produces": ["application/json"], |
640 | 673 | "tags": ["general"], |
641 | 674 | "description": "", |
642 | 675 | "responses": { |
643 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 676 | + "500": { |
| 677 | + "description": "Error", |
| 678 | + "schema": { "$ref": "#/definitions/error" } |
| 679 | + } |
644 | 680 | }, |
645 | 681 | "x-appwrite": { |
646 | 682 | "method": "error500", |
647 | 683 | "weight": 186, |
648 | 684 | "cookies": false, |
649 | 685 | "type": "", |
650 | 686 | "demo": "general/error500.md", |
651 | | - "edit": "https://github.com/appwrite/appwrite/edit/masterMock an 500 error", |
| 687 | + "edit": "https://github.com/appwrite/appwrite/edit/masterMock a an 500 failed request.", |
652 | 688 | "rate-limit": 0, |
653 | 689 | "rate-time": 3600, |
654 | 690 | "rate-key": "url:{url},ip:{ip}", |
|
661 | 697 | }, |
662 | 698 | "/mock/tests/general/empty": { |
663 | 699 | "get": { |
664 | | - "summary": "Mock a post request for SDK tests", |
| 700 | + "summary": "Empty Response", |
665 | 701 | "operationId": "generalEmpty", |
666 | 702 | "consumes": ["application/json"], |
667 | 703 | "produces": [], |
668 | 704 | "tags": ["general"], |
669 | 705 | "description": "", |
670 | | - "responses": { |
671 | | - "500": { "description": "File", "schema": { "type": "file" } } |
672 | | - }, |
| 706 | + "responses": { "204": { "description": "No content" } }, |
673 | 707 | "x-appwrite": { |
674 | 708 | "method": "empty", |
675 | 709 | "weight": 184, |
676 | 710 | "cookies": false, |
677 | 711 | "type": "", |
678 | 712 | "demo": "general/empty.md", |
679 | | - "edit": "https://github.com/appwrite/appwrite/edit/masterMock a redirected request for SDK tests", |
| 713 | + "edit": "https://github.com/appwrite/appwrite/edit/masterMock a an empty response body.", |
680 | 714 | "rate-limit": 0, |
681 | 715 | "rate-time": 3600, |
682 | 716 | "rate-key": "url:{url},ip:{ip}", |
|
689 | 723 | }, |
690 | 724 | "/mock/tests/general/get-cookie": { |
691 | 725 | "get": { |
692 | | - "summary": "Mock a cookie request for SDK tests", |
| 726 | + "summary": "Get Cookie", |
693 | 727 | "operationId": "generalGetCookie", |
694 | 728 | "consumes": ["application/json"], |
695 | | - "produces": [], |
| 729 | + "produces": ["application/json"], |
696 | 730 | "tags": ["general"], |
697 | 731 | "description": "", |
698 | 732 | "responses": { |
699 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 733 | + "200": { |
| 734 | + "description": "Mock", |
| 735 | + "schema": { "$ref": "#/definitions/mock" } |
| 736 | + } |
700 | 737 | }, |
701 | 738 | "x-appwrite": { |
702 | 739 | "method": "getCookie", |
703 | 740 | "weight": 183, |
704 | 741 | "cookies": false, |
705 | 742 | "type": "", |
706 | 743 | "demo": "general/get-cookie.md", |
707 | | - "edit": "https://github.com/appwrite/appwrite/edit/masterMock a get cookie request for SDK tests", |
| 744 | + "edit": "https://github.com/appwrite/appwrite/edit/masterMock a cookie response.", |
708 | 745 | "rate-limit": 0, |
709 | 746 | "rate-time": 3600, |
710 | 747 | "rate-key": "url:{url},ip:{ip}", |
|
717 | 754 | }, |
718 | 755 | "/mock/tests/general/redirect": { |
719 | 756 | "get": { |
720 | | - "summary": "Mock a post request for SDK tests", |
| 757 | + "summary": "Redirect", |
721 | 758 | "operationId": "generalRedirect", |
722 | 759 | "consumes": ["application/json"], |
723 | | - "produces": [], |
| 760 | + "produces": ["text/html"], |
724 | 761 | "tags": ["general"], |
725 | 762 | "description": "", |
726 | 763 | "responses": { |
727 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 764 | + "301": { "description": "File", "schema": { "type": "file" } } |
728 | 765 | }, |
729 | 766 | "x-appwrite": { |
730 | 767 | "method": "redirect", |
|
745 | 782 | }, |
746 | 783 | "/mock/tests/general/redirect/done": { |
747 | 784 | "get": { |
748 | | - "summary": "Mock a post request for SDK tests", |
| 785 | + "summary": "Redirect Target", |
749 | 786 | "operationId": "generalRedirected", |
750 | 787 | "consumes": ["application/json"], |
751 | | - "produces": [], |
| 788 | + "produces": ["application/json"], |
752 | 789 | "tags": ["general"], |
753 | 790 | "description": "", |
754 | 791 | "responses": { |
755 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 792 | + "200": { |
| 793 | + "description": "Mock", |
| 794 | + "schema": { "$ref": "#/definitions/mock" } |
| 795 | + } |
756 | 796 | }, |
757 | 797 | "x-appwrite": { |
758 | 798 | "method": "redirected", |
|
773 | 813 | }, |
774 | 814 | "/mock/tests/general/set-cookie": { |
775 | 815 | "get": { |
776 | | - "summary": "Mock a cookie request for SDK tests", |
| 816 | + "summary": "Set Cookie", |
777 | 817 | "operationId": "generalSetCookie", |
778 | 818 | "consumes": ["application/json"], |
779 | | - "produces": [], |
| 819 | + "produces": ["application/json"], |
780 | 820 | "tags": ["general"], |
781 | 821 | "description": "", |
782 | 822 | "responses": { |
783 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 823 | + "200": { |
| 824 | + "description": "Mock", |
| 825 | + "schema": { "$ref": "#/definitions/mock" } |
| 826 | + } |
784 | 827 | }, |
785 | 828 | "x-appwrite": { |
786 | 829 | "method": "setCookie", |
787 | 830 | "weight": 182, |
788 | 831 | "cookies": false, |
789 | 832 | "type": "", |
790 | 833 | "demo": "general/set-cookie.md", |
791 | | - "edit": "https://github.com/appwrite/appwrite/edit/masterMock a set cookie request for SDK tests", |
| 834 | + "edit": "https://github.com/appwrite/appwrite/edit/masterMock a set cookie request.", |
792 | 835 | "rate-limit": 0, |
793 | 836 | "rate-time": 3600, |
794 | 837 | "rate-key": "url:{url},ip:{ip}", |
|
801 | 844 | }, |
802 | 845 | "/mock/tests/general/upload": { |
803 | 846 | "post": { |
804 | | - "summary": "Mock a post request for SDK tests", |
| 847 | + "summary": "Upload File", |
805 | 848 | "operationId": "generalUpload", |
806 | 849 | "consumes": ["multipart/form-data"], |
807 | | - "produces": [], |
| 850 | + "produces": ["application/json"], |
808 | 851 | "tags": ["general"], |
809 | 852 | "description": "", |
810 | 853 | "responses": { |
811 | | - "500": { "description": "File", "schema": { "type": "file" } } |
| 854 | + "200": { |
| 855 | + "description": "Mock", |
| 856 | + "schema": { "$ref": "#/definitions/mock" } |
| 857 | + } |
812 | 858 | }, |
813 | 859 | "x-appwrite": { |
814 | 860 | "method": "upload", |
|
2210 | 2256 | } |
2211 | 2257 | }, |
2212 | 2258 | "required": ["code", "countryCode", "countryName"] |
| 2259 | + }, |
| 2260 | + "mock": { |
| 2261 | + "description": "Mock", |
| 2262 | + "type": "object", |
| 2263 | + "properties": { |
| 2264 | + "result": { |
| 2265 | + "type": "string", |
| 2266 | + "description": "Result message.", |
| 2267 | + "x-example": "Success" |
| 2268 | + } |
| 2269 | + }, |
| 2270 | + "required": ["result"] |
2213 | 2271 | } |
2214 | 2272 | }, |
2215 | 2273 | "externalDocs": { |
|
0 commit comments