git.iko.soy/typeable/swagger2
on master help sign in
remove trailing whitespace
c330fd9Sönke Hahn
test/Data/SwaggerSpec.hs+298−298
@@ -493,7 +493,7 @@ swaggerExample = mempty
493 "created": 100,
493 "created": 100,
494 "description": "get milk"
494 "description": "get milk"
495 } |]
495 } |]
496− & description ?~ "This is some real Todo right here"
496+ & description ?~ "This is some real Todo right here"
497 & properties .~
497 & properties .~
498 [ ("created", Inline $ mempty
498 [ ("created", Inline $ mempty
499 & type_ .~ SwaggerInteger
499 & type_ .~ SwaggerInteger
@@ -575,130 +575,130 @@ swaggerExampleJSON = [aesonQQ|
575
575
576petstoreExampleJSON :: Value
576petstoreExampleJSON :: Value
577petstoreExampleJSON = [aesonQQ|
577petstoreExampleJSON = [aesonQQ|
578−{
578+{
579 "swagger":"2.0",
579 "swagger":"2.0",
580− "info":{
580+ "info":{
581 "description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
581 "description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
582 "version":"1.0.0",
582 "version":"1.0.0",
583 "title":"Swagger Petstore",
583 "title":"Swagger Petstore",
584 "termsOfService":"http://swagger.io/terms/",
584 "termsOfService":"http://swagger.io/terms/",
585− "contact":{
585+ "contact":{
586 "email":"apiteam@swagger.io"
586 "email":"apiteam@swagger.io"
587 },
587 },
588− "license":{
588+ "license":{
589 "name":"Apache 2.0",
589 "name":"Apache 2.0",
590 "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
590 "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
591 }
591 }
592 },
592 },
593 "host":"petstore.swagger.io",
593 "host":"petstore.swagger.io",
594 "basePath":"/v2",
594 "basePath":"/v2",
595− "tags":[
595+ "tags":[
596− {
596+ {
597 "name":"pet",
597 "name":"pet",
598 "description":"Everything about your Pets",
598 "description":"Everything about your Pets",
599− "externalDocs":{
599+ "externalDocs":{
600 "description":"Find out more",
600 "description":"Find out more",
601 "url":"http://swagger.io"
601 "url":"http://swagger.io"
602 }
602 }
603 },
603 },
604− {
604+ {
605 "name":"store",
605 "name":"store",
606 "description":"Access to Petstore orders"
606 "description":"Access to Petstore orders"
607 },
607 },
608− {
608+ {
609 "name":"user",
609 "name":"user",
610 "description":"Operations about user",
610 "description":"Operations about user",
611− "externalDocs":{
611+ "externalDocs":{
612 "description":"Find out more about our store",
612 "description":"Find out more about our store",
613 "url":"http://swagger.io"
613 "url":"http://swagger.io"
614 }
614 }
615 }
615 }
616 ],
616 ],
617− "schemes":[
617+ "schemes":[
618 "http"
618 "http"
619 ],
619 ],
620− "paths":{
620+ "paths":{
621− "/pet":{
621+ "/pet":{
622− "post":{
622+ "post":{
623− "tags":[
623+ "tags":[
624 "pet"
624 "pet"
625 ],
625 ],
626 "summary":"Add a new pet to the store",
626 "summary":"Add a new pet to the store",
627 "description":"",
627 "description":"",
628 "operationId":"addPet",
628 "operationId":"addPet",
629− "consumes":[
629+ "consumes":[
630 "application/json",
630 "application/json",
631 "application/xml"
631 "application/xml"
632 ],
632 ],
633− "produces":[
633+ "produces":[
634 "application/xml",
634 "application/xml",
635 "application/json"
635 "application/json"
636 ],
636 ],
637− "parameters":[
637+ "parameters":[
638− {
638+ {
639 "in":"body",
639 "in":"body",
640 "name":"body",
640 "name":"body",
641 "description":"Pet object that needs to be added to the store",
641 "description":"Pet object that needs to be added to the store",
642 "required":true,
642 "required":true,
643− "schema":{
643+ "schema":{
644 "$ref":"#/definitions/Pet"
644 "$ref":"#/definitions/Pet"
645 }
645 }
646 }
646 }
647 ],
647 ],
648− "responses":{
648+ "responses":{
649− "405":{
649+ "405":{
650 "description":"Invalid input"
650 "description":"Invalid input"
651 }
651 }
652 },
652 },
653− "security":[
653+ "security":[
654− {
654+ {
655− "petstore_auth":[
655+ "petstore_auth":[
656 "write:pets",
656 "write:pets",
657 "read:pets"
657 "read:pets"
658 ]
658 ]
659 }
659 }
660 ]
660 ]
661 },
661 },
662− "put":{
662+ "put":{
663− "tags":[
663+ "tags":[
664 "pet"
664 "pet"
665 ],
665 ],
666 "summary":"Update an existing pet",
666 "summary":"Update an existing pet",
667 "description":"",
667 "description":"",
668 "operationId":"updatePet",
668 "operationId":"updatePet",
669− "consumes":[
669+ "consumes":[
670 "application/json",
670 "application/json",
671 "application/xml"
671 "application/xml"
672 ],
672 ],
673− "produces":[
673+ "produces":[
674 "application/xml",
674 "application/xml",
675 "application/json"
675 "application/json"
676 ],
676 ],
677− "parameters":[
677+ "parameters":[
678− {
678+ {
679 "in":"body",
679 "in":"body",
680 "name":"body",
680 "name":"body",
681 "description":"Pet object that needs to be added to the store",
681 "description":"Pet object that needs to be added to the store",
682 "required":true,
682 "required":true,
683− "schema":{
683+ "schema":{
684 "$ref":"#/definitions/Pet"
684 "$ref":"#/definitions/Pet"
685 }
685 }
686 }
686 }
687 ],
687 ],
688− "responses":{
688+ "responses":{
689− "400":{
689+ "400":{
690 "description":"Invalid ID supplied"
690 "description":"Invalid ID supplied"
691 },
691 },
692− "404":{
692+ "404":{
693 "description":"Pet not found"
693 "description":"Pet not found"
694 },
694 },
695− "405":{
695+ "405":{
696 "description":"Validation exception"
696 "description":"Validation exception"
697 }
697 }
698 },
698 },
699− "security":[
699+ "security":[
700− {
700+ {
701− "petstore_auth":[
701+ "petstore_auth":[
702 "write:pets",
702 "write:pets",
703 "read:pets"
703 "read:pets"
704 ]
704 ]
@@ -706,28 +706,28 @@ petstoreExampleJSON = [aesonQQ|
706 ]
706 ]
707 }
707 }
708 },
708 },
709− "/pet/findByStatus":{
709+ "/pet/findByStatus":{
710− "get":{
710+ "get":{
711− "tags":[
711+ "tags":[
712 "pet"
712 "pet"
713 ],
713 ],
714 "summary":"Finds Pets by status",
714 "summary":"Finds Pets by status",
715 "description":"Multiple status values can be provided with comma seperated strings",
715 "description":"Multiple status values can be provided with comma seperated strings",
716 "operationId":"findPetsByStatus",
716 "operationId":"findPetsByStatus",
717− "produces":[
717+ "produces":[
718 "application/xml",
718 "application/xml",
719 "application/json"
719 "application/json"
720 ],
720 ],
721− "parameters":[
721+ "parameters":[
722− {
722+ {
723 "name":"status",
723 "name":"status",
724 "in":"query",
724 "in":"query",
725 "description":"Status values that need to be considered for filter",
725 "description":"Status values that need to be considered for filter",
726 "required":true,
726 "required":true,
727 "type":"array",
727 "type":"array",
728− "items":{
728+ "items":{
729 "type":"string",
729 "type":"string",
730− "enum":[
730+ "enum":[
731 "available",
731 "available",
732 "pending",
732 "pending",
733 "sold"
733 "sold"
@@ -737,23 +737,23 @@ petstoreExampleJSON = [aesonQQ|
737 "collectionFormat":"csv"
737 "collectionFormat":"csv"
738 }
738 }
739 ],
739 ],
740− "responses":{
740+ "responses":{
741− "200":{
741+ "200":{
742 "description":"successful operation",
742 "description":"successful operation",
743− "schema":{
743+ "schema":{
744 "type":"array",
744 "type":"array",
745− "items":{
745+ "items":{
746 "$ref":"#/definitions/Pet"
746 "$ref":"#/definitions/Pet"
747 }
747 }
748 }
748 }
749 },
749 },
750− "400":{
750+ "400":{
751 "description":"Invalid status value"
751 "description":"Invalid status value"
752 }
752 }
753 },
753 },
754− "security":[
754+ "security":[
755− {
755+ {
756− "petstore_auth":[
756+ "petstore_auth":[
757 "write:pets",
757 "write:pets",
758 "read:pets"
758 "read:pets"
759 ]
759 ]
@@ -761,48 +761,48 @@ petstoreExampleJSON = [aesonQQ|
761 ]
761 ]
762 }
762 }
763 },
763 },
764− "/pet/findByTags":{
764+ "/pet/findByTags":{
765− "get":{
765+ "get":{
766− "tags":[
766+ "tags":[
767 "pet"
767 "pet"
768 ],
768 ],
769 "summary":"Finds Pets by tags",
769 "summary":"Finds Pets by tags",
770 "description":"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
770 "description":"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
771 "operationId":"findPetsByTags",
771 "operationId":"findPetsByTags",
772− "produces":[
772+ "produces":[
773 "application/xml",
773 "application/xml",
774 "application/json"
774 "application/json"
775 ],
775 ],
776− "parameters":[
776+ "parameters":[
777− {
777+ {
778 "name":"tags",
778 "name":"tags",
779 "in":"query",
779 "in":"query",
780 "description":"Tags to filter by",
780 "description":"Tags to filter by",
781 "required":true,
781 "required":true,
782 "type":"array",
782 "type":"array",
783− "items":{
783+ "items":{
784 "type":"string"
784 "type":"string"
785 },
785 },
786 "collectionFormat":"csv"
786 "collectionFormat":"csv"
787 }
787 }
788 ],
788 ],
789− "responses":{
789+ "responses":{
790− "200":{
790+ "200":{
791 "description":"successful operation",
791 "description":"successful operation",
792− "schema":{
792+ "schema":{
793 "type":"array",
793 "type":"array",
794− "items":{
794+ "items":{
795 "$ref":"#/definitions/Pet"
795 "$ref":"#/definitions/Pet"
796 }
796 }
797 }
797 }
798 },
798 },
799− "400":{
799+ "400":{
800 "description":"Invalid tag value"
800 "description":"Invalid tag value"
801 }
801 }
802 },
802 },
803− "security":[
803+ "security":[
804− {
804+ {
805− "petstore_auth":[
805+ "petstore_auth":[
806 "write:pets",
806 "write:pets",
807 "read:pets"
807 "read:pets"
808 ]
808 ]
@@ -810,20 +810,20 @@ petstoreExampleJSON = [aesonQQ|
810 ]
810 ]
811 }
811 }
812 },
812 },
813− "/pet/{petId}":{
813+ "/pet/{petId}":{
814− "get":{
814+ "get":{
815− "tags":[
815+ "tags":[
816 "pet"
816 "pet"
817 ],
817 ],
818 "summary":"Find pet by ID",
818 "summary":"Find pet by ID",
819 "description":"Returns a single pet",
819 "description":"Returns a single pet",
820 "operationId":"getPetById",
820 "operationId":"getPetById",
821− "produces":[
821+ "produces":[
822 "application/xml",
822 "application/xml",
823 "application/json"
823 "application/json"
824 ],
824 ],
825− "parameters":[
825+ "parameters":[
826− {
826+ {
827 "name":"petId",
827 "name":"petId",
828 "in":"path",
828 "in":"path",
829 "description":"ID of pet to return",
829 "description":"ID of pet to return",
@@ -832,42 +832,42 @@ petstoreExampleJSON = [aesonQQ|
832 "format":"int64"
832 "format":"int64"
833 }
833 }
834 ],
834 ],
835− "responses":{
835+ "responses":{
836− "200":{
836+ "200":{
837 "description":"successful operation",
837 "description":"successful operation",
838− "schema":{
838+ "schema":{
839 "$ref":"#/definitions/Pet"
839 "$ref":"#/definitions/Pet"
840 }
840 }
841 },
841 },
842− "400":{
842+ "400":{
843 "description":"Invalid ID supplied"
843 "description":"Invalid ID supplied"
844 },
844 },
845− "404":{
845+ "404":{
846 "description":"Pet not found"
846 "description":"Pet not found"
847 }
847 }
848 },
848 },
849− "security":[
849+ "security":[
850− {
850+ {
851 "api_key": []
851 "api_key": []
852 }
852 }
853 ]
853 ]
854 },
854 },
855− "post":{
855+ "post":{
856− "tags":[
856+ "tags":[
857 "pet"
857 "pet"
858 ],
858 ],
859 "summary":"Updates a pet in the store with form data",
859 "summary":"Updates a pet in the store with form data",
860 "description":"",
860 "description":"",
861 "operationId":"updatePetWithForm",
861 "operationId":"updatePetWithForm",
862− "consumes":[
862+ "consumes":[
863 "application/x-www-form-urlencoded"
863 "application/x-www-form-urlencoded"
864 ],
864 ],
865− "produces":[
865+ "produces":[
866 "application/xml",
866 "application/xml",
867 "application/json"
867 "application/json"
868 ],
868 ],
869− "parameters":[
869+ "parameters":[
870− {
870+ {
871 "name":"petId",
871 "name":"petId",
872 "in":"path",
872 "in":"path",
873 "description":"ID of pet that needs to be updated",
873 "description":"ID of pet that needs to be updated",
@@ -875,14 +875,14 @@ petstoreExampleJSON = [aesonQQ|
875 "type":"integer",
875 "type":"integer",
876 "format":"int64"
876 "format":"int64"
877 },
877 },
878− {
878+ {
879 "name":"name",
879 "name":"name",
880 "in":"formData",
880 "in":"formData",
881 "description":"Updated name of the pet",
881 "description":"Updated name of the pet",
882 "required":false,
882 "required":false,
883 "type":"string"
883 "type":"string"
884 },
884 },
885− {
885+ {
886 "name":"status",
886 "name":"status",
887 "in":"formData",
887 "in":"formData",
888 "description":"Updated status of the pet",
888 "description":"Updated status of the pet",
@@ -890,39 +890,39 @@ petstoreExampleJSON = [aesonQQ|
890 "type":"string"
890 "type":"string"
891 }
891 }
892 ],
892 ],
893− "responses":{
893+ "responses":{
894− "405":{
894+ "405":{
895 "description":"Invalid input"
895 "description":"Invalid input"
896 }
896 }
897 },
897 },
898− "security":[
898+ "security":[
899− {
899+ {
900− "petstore_auth":[
900+ "petstore_auth":[
901 "write:pets",
901 "write:pets",
902 "read:pets"
902 "read:pets"
903 ]
903 ]
904 }
904 }
905 ]
905 ]
906 },
906 },
907− "delete":{
907+ "delete":{
908− "tags":[
908+ "tags":[
909 "pet"
909 "pet"
910 ],
910 ],
911 "summary":"Deletes a pet",
911 "summary":"Deletes a pet",
912 "description":"",
912 "description":"",
913 "operationId":"deletePet",
913 "operationId":"deletePet",
914− "produces":[
914+ "produces":[
915 "application/xml",
915 "application/xml",
916 "application/json"
916 "application/json"
917 ],
917 ],
918− "parameters":[
918+ "parameters":[
919− {
919+ {
920 "name":"api_key",
920 "name":"api_key",
921 "in":"header",
921 "in":"header",
922 "required":false,
922 "required":false,
923 "type":"string"
923 "type":"string"
924 },
924 },
925− {
925+ {
926 "name":"petId",
926 "name":"petId",
927 "in":"path",
927 "in":"path",
928 "description":"Pet id to delete",
928 "description":"Pet id to delete",
@@ -931,14 +931,14 @@ petstoreExampleJSON = [aesonQQ|
931 "format":"int64"
931 "format":"int64"
932 }
932 }
933 ],
933 ],
934− "responses":{
934+ "responses":{
935− "400":{
935+ "400":{
936 "description":"Invalid pet value"
936 "description":"Invalid pet value"
937 }
937 }
938 },
938 },
939− "security":[
939+ "security":[
940− {
940+ {
941− "petstore_auth":[
941+ "petstore_auth":[
942 "write:pets",
942 "write:pets",
943 "read:pets"
943 "read:pets"
944 ]
944 ]
@@ -946,22 +946,22 @@ petstoreExampleJSON = [aesonQQ|
946 ]
946 ]
947 }
947 }
948 },
948 },
949− "/pet/{petId}/uploadImage":{
949+ "/pet/{petId}/uploadImage":{
950− "post":{
950+ "post":{
951− "tags":[
951+ "tags":[
952 "pet"
952 "pet"
953 ],
953 ],
954 "summary":"uploads an image",
954 "summary":"uploads an image",
955 "description":"",
955 "description":"",
956 "operationId":"uploadFile",
956 "operationId":"uploadFile",
957− "consumes":[
957+ "consumes":[
958 "multipart/form-data"
958 "multipart/form-data"
959 ],
959 ],
960− "produces":[
960+ "produces":[
961 "application/json"
961 "application/json"
962 ],
962 ],
963− "parameters":[
963+ "parameters":[
964− {
964+ {
965 "name":"petId",
965 "name":"petId",
966 "in":"path",
966 "in":"path",
967 "description":"ID of pet to update",
967 "description":"ID of pet to update",
@@ -969,14 +969,14 @@ petstoreExampleJSON = [aesonQQ|
969 "type":"integer",
969 "type":"integer",
970 "format":"int64"
970 "format":"int64"
971 },
971 },
972− {
972+ {
973 "name":"additionalMetadata",
973 "name":"additionalMetadata",
974 "in":"formData",
974 "in":"formData",
975 "description":"Additional data to pass to server",
975 "description":"Additional data to pass to server",
976 "required":false,
976 "required":false,
977 "type":"string"
977 "type":"string"
978 },
978 },
979− {
979+ {
980 "name":"file",
980 "name":"file",
981 "in":"formData",
981 "in":"formData",
982 "description":"file to upload",
982 "description":"file to upload",
@@ -984,17 +984,17 @@ petstoreExampleJSON = [aesonQQ|
984 "type":"file"
984 "type":"file"
985 }
985 }
986 ],
986 ],
987− "responses":{
987+ "responses":{
988− "200":{
988+ "200":{
989 "description":"successful operation",
989 "description":"successful operation",
990− "schema":{
990+ "schema":{
991 "$ref":"#/definitions/ApiResponse"
991 "$ref":"#/definitions/ApiResponse"
992 }
992 }
993 }
993 }
994 },
994 },
995− "security":[
995+ "security":[
996− {
996+ {
997− "petstore_auth":[
997+ "petstore_auth":[
998 "write:pets",
998 "write:pets",
999 "read:pets"
999 "read:pets"
1000 ]
1000 ]
@@ -1002,87 +1002,87 @@ petstoreExampleJSON = [aesonQQ|
1002 ]
1002 ]
1003 }
1003 }
1004 },
1004 },
1005− "/store/inventory":{
1005+ "/store/inventory":{
1006− "get":{
1006+ "get":{
1007− "tags":[
1007+ "tags":[
1008 "store"
1008 "store"
1009 ],
1009 ],
1010 "summary":"Returns pet inventories by status",
1010 "summary":"Returns pet inventories by status",
1011 "description":"Returns a map of status codes to quantities",
1011 "description":"Returns a map of status codes to quantities",
1012 "operationId":"getInventory",
1012 "operationId":"getInventory",
1013− "produces":[
1013+ "produces":[
1014 "application/json"
1014 "application/json"
1015 ],
1015 ],
1016 "parameters": [],
1016 "parameters": [],
1017− "responses":{
1017+ "responses":{
1018− "200":{
1018+ "200":{
1019 "description":"successful operation",
1019 "description":"successful operation",
1020− "schema":{
1020+ "schema":{
1021 "type":"object",
1021 "type":"object",
1022− "additionalProperties":{
1022+ "additionalProperties":{
1023 "type":"integer",
1023 "type":"integer",
1024 "format":"int32"
1024 "format":"int32"
1025 }
1025 }
1026 }
1026 }
1027 }
1027 }
1028 },
1028 },
1029− "security":[
1029+ "security":[
1030− {
1030+ {
1031 "api_key": []
1031 "api_key": []
1032 }
1032 }
1033 ]
1033 ]
1034 }
1034 }
1035 },
1035 },
1036− "/store/order":{
1036+ "/store/order":{
1037− "post":{
1037+ "post":{
1038− "tags":[
1038+ "tags":[
1039 "store"
1039 "store"
1040 ],
1040 ],
1041 "summary":"Place an order for a pet",
1041 "summary":"Place an order for a pet",
1042 "description":"",
1042 "description":"",
1043 "operationId":"placeOrder",
1043 "operationId":"placeOrder",
1044− "produces":[
1044+ "produces":[
1045 "application/xml",
1045 "application/xml",
1046 "application/json"
1046 "application/json"
1047 ],
1047 ],
1048− "parameters":[
1048+ "parameters":[
1049− {
1049+ {
1050 "in":"body",
1050 "in":"body",
1051 "name":"body",
1051 "name":"body",
1052 "description":"order placed for purchasing the pet",
1052 "description":"order placed for purchasing the pet",
1053 "required":true,
1053 "required":true,
1054− "schema":{
1054+ "schema":{
1055 "$ref":"#/definitions/Order"
1055 "$ref":"#/definitions/Order"
1056 }
1056 }
1057 }
1057 }
1058 ],
1058 ],
1059− "responses":{
1059+ "responses":{
1060− "200":{
1060+ "200":{
1061 "description":"successful operation",
1061 "description":"successful operation",
1062− "schema":{
1062+ "schema":{
1063 "$ref":"#/definitions/Order"
1063 "$ref":"#/definitions/Order"
1064 }
1064 }
1065 },
1065 },
1066− "400":{
1066+ "400":{
1067 "description":"Invalid Order"
1067 "description":"Invalid Order"
1068 }
1068 }
1069 }
1069 }
1070 }
1070 }
1071 },
1071 },
1072− "/store/order/{orderId}":{
1072+ "/store/order/{orderId}":{
1073− "get":{
1073+ "get":{
1074− "tags":[
1074+ "tags":[
1075 "store"
1075 "store"
1076 ],
1076 ],
1077 "summary":"Find purchase order by ID",
1077 "summary":"Find purchase order by ID",
1078 "description":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
1078 "description":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
1079 "operationId":"getOrderById",
1079 "operationId":"getOrderById",
1080− "produces":[
1080+ "produces":[
1081 "application/xml",
1081 "application/xml",
1082 "application/json"
1082 "application/json"
1083 ],
1083 ],
1084− "parameters":[
1084+ "parameters":[
1085− {
1085+ {
1086 "name":"orderId",
1086 "name":"orderId",
1087 "in":"path",
1087 "in":"path",
1088 "description":"ID of pet that needs to be fetched",
1088 "description":"ID of pet that needs to be fetched",
@@ -1093,34 +1093,34 @@ petstoreExampleJSON = [aesonQQ|
1093 "format":"int64"
1093 "format":"int64"
1094 }
1094 }
1095 ],
1095 ],
1096− "responses":{
1096+ "responses":{
1097− "200":{
1097+ "200":{
1098 "description":"successful operation",
1098 "description":"successful operation",
1099− "schema":{
1099+ "schema":{
1100 "$ref":"#/definitions/Order"
1100 "$ref":"#/definitions/Order"
1101 }
1101 }
1102 },
1102 },
1103− "400":{
1103+ "400":{
1104 "description":"Invalid ID supplied"
1104 "description":"Invalid ID supplied"
1105 },
1105 },
1106− "404":{
1106+ "404":{
1107 "description":"Order not found"
1107 "description":"Order not found"
1108 }
1108 }
1109 }
1109 }
1110 },
1110 },
1111− "delete":{
1111+ "delete":{
1112− "tags":[
1112+ "tags":[
1113 "store"
1113 "store"
1114 ],
1114 ],
1115 "summary":"Delete purchase order by ID",
1115 "summary":"Delete purchase order by ID",
1116 "description":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
1116 "description":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
1117 "operationId":"deleteOrder",
1117 "operationId":"deleteOrder",
1118− "produces":[
1118+ "produces":[
1119 "application/xml",
1119 "application/xml",
1120 "application/json"
1120 "application/json"
1121 ],
1121 ],
1122− "parameters":[
1122+ "parameters":[
1123− {
1123+ {
1124 "name":"orderId",
1124 "name":"orderId",
1125 "in":"path",
1125 "in":"path",
1126 "description":"ID of the order that needs to be deleted",
1126 "description":"ID of the order that needs to be deleted",
@@ -1129,133 +1129,133 @@ petstoreExampleJSON = [aesonQQ|
1129 "minimum":1.0
1129 "minimum":1.0
1130 }
1130 }
1131 ],
1131 ],
1132− "responses":{
1132+ "responses":{
1133− "400":{
1133+ "400":{
1134 "description":"Invalid ID supplied"
1134 "description":"Invalid ID supplied"
1135 },
1135 },
1136− "404":{
1136+ "404":{
1137 "description":"Order not found"
1137 "description":"Order not found"
1138 }
1138 }
1139 }
1139 }
1140 }
1140 }
1141 },
1141 },
1142− "/user":{
1142+ "/user":{
1143− "post":{
1143+ "post":{
1144− "tags":[
1144+ "tags":[
1145 "user"
1145 "user"
1146 ],
1146 ],
1147 "summary":"Create user",
1147 "summary":"Create user",
1148 "description":"This can only be done by the logged in user.",
1148 "description":"This can only be done by the logged in user.",
1149 "operationId":"createUser",
1149 "operationId":"createUser",
1150− "produces":[
1150+ "produces":[
1151 "application/xml",
1151 "application/xml",
1152 "application/json"
1152 "application/json"
1153 ],
1153 ],
1154− "parameters":[
1154+ "parameters":[
1155− {
1155+ {
1156 "in":"body",
1156 "in":"body",
1157 "name":"body",
1157 "name":"body",
1158 "description":"Created user object",
1158 "description":"Created user object",
1159 "required":true,
1159 "required":true,
1160− "schema":{
1160+ "schema":{
1161 "$ref":"#/definitions/User"
1161 "$ref":"#/definitions/User"
1162 }
1162 }
1163 }
1163 }
1164 ],
1164 ],
1165− "responses":{
1165+ "responses":{
1166− "default":{
1166+ "default":{
1167 "description":"successful operation"
1167 "description":"successful operation"
1168 }
1168 }
1169 }
1169 }
1170 }
1170 }
1171 },
1171 },
1172− "/user/createWithArray":{
1172+ "/user/createWithArray":{
1173− "post":{
1173+ "post":{
1174− "tags":[
1174+ "tags":[
1175 "user"
1175 "user"
1176 ],
1176 ],
1177 "summary":"Creates list of users with given input array",
1177 "summary":"Creates list of users with given input array",
1178 "description":"",
1178 "description":"",
1179 "operationId":"createUsersWithArrayInput",
1179 "operationId":"createUsersWithArrayInput",
1180− "produces":[
1180+ "produces":[
1181 "application/xml",
1181 "application/xml",
1182 "application/json"
1182 "application/json"
1183 ],
1183 ],
1184− "parameters":[
1184+ "parameters":[
1185− {
1185+ {
1186 "in":"body",
1186 "in":"body",
1187 "name":"body",
1187 "name":"body",
1188 "description":"List of user object",
1188 "description":"List of user object",
1189 "required":true,
1189 "required":true,
1190− "schema":{
1190+ "schema":{
1191 "type":"array",
1191 "type":"array",
1192− "items":{
1192+ "items":{
1193 "$ref":"#/definitions/User"
1193 "$ref":"#/definitions/User"
1194 }
1194 }
1195 }
1195 }
1196 }
1196 }
1197 ],
1197 ],
1198− "responses":{
1198+ "responses":{
1199− "default":{
1199+ "default":{
1200 "description":"successful operation"
1200 "description":"successful operation"
1201 }
1201 }
1202 }
1202 }
1203 }
1203 }
1204 },
1204 },
1205− "/user/createWithList":{
1205+ "/user/createWithList":{
1206− "post":{
1206+ "post":{
1207− "tags":[
1207+ "tags":[
1208 "user"
1208 "user"
1209 ],
1209 ],
1210 "summary":"Creates list of users with given input array",
1210 "summary":"Creates list of users with given input array",
1211 "description":"",
1211 "description":"",
1212 "operationId":"createUsersWithListInput",
1212 "operationId":"createUsersWithListInput",
1213− "produces":[
1213+ "produces":[
1214 "application/xml",
1214 "application/xml",
1215 "application/json"
1215 "application/json"
1216 ],
1216 ],
1217− "parameters":[
1217+ "parameters":[
1218− {
1218+ {
1219 "in":"body",
1219 "in":"body",
1220 "name":"body",
1220 "name":"body",
1221 "description":"List of user object",
1221 "description":"List of user object",
1222 "required":true,
1222 "required":true,
1223− "schema":{
1223+ "schema":{
1224 "type":"array",
1224 "type":"array",
1225− "items":{
1225+ "items":{
1226 "$ref":"#/definitions/User"
1226 "$ref":"#/definitions/User"
1227 }
1227 }
1228 }
1228 }
1229 }
1229 }
1230 ],
1230 ],
1231− "responses":{
1231+ "responses":{
1232− "default":{
1232+ "default":{
1233 "description":"successful operation"
1233 "description":"successful operation"
1234 }
1234 }
1235 }
1235 }
1236 }
1236 }
1237 },
1237 },
1238− "/user/login":{
1238+ "/user/login":{
1239− "get":{
1239+ "get":{
1240− "tags":[
1240+ "tags":[
1241 "user"
1241 "user"
1242 ],
1242 ],
1243 "summary":"Logs user into the system",
1243 "summary":"Logs user into the system",
1244 "description":"",
1244 "description":"",
1245 "operationId":"loginUser",
1245 "operationId":"loginUser",
1246− "produces":[
1246+ "produces":[
1247 "application/xml",
1247 "application/xml",
1248 "application/json"
1248 "application/json"
1249 ],
1249 ],
1250− "parameters":[
1250+ "parameters":[
1251− {
1251+ {
1252 "name":"username",
1252 "name":"username",
1253 "in":"query",
1253 "in":"query",
1254 "description":"The user name for login",
1254 "description":"The user name for login",
1255 "required":true,
1255 "required":true,
1256 "type":"string"
1256 "type":"string"
1257 },
1257 },
1258− {
1258+ {
1259 "name":"password",
1259 "name":"password",
1260 "in":"query",
1260 "in":"query",
1261 "description":"The password for login in clear text",
1261 "description":"The password for login in clear text",
@@ -1263,65 +1263,65 @@ petstoreExampleJSON = [aesonQQ|
1263 "type":"string"
1263 "type":"string"
1264 }
1264 }
1265 ],
1265 ],
1266− "responses":{
1266+ "responses":{
1267− "200":{
1267+ "200":{
1268 "description":"successful operation",
1268 "description":"successful operation",
1269− "schema":{
1269+ "schema":{
1270 "type":"string"
1270 "type":"string"
1271 },
1271 },
1272− "headers":{
1272+ "headers":{
1273− "X-Rate-Limit":{
1273+ "X-Rate-Limit":{
1274 "type":"integer",
1274 "type":"integer",
1275 "format":"int32",
1275 "format":"int32",
1276 "description":"calls per hour allowed by the user"
1276 "description":"calls per hour allowed by the user"
1277 },
1277 },
1278− "X-Expires-After":{
1278+ "X-Expires-After":{
1279 "type":"string",
1279 "type":"string",
1280 "format":"date-time",
1280 "format":"date-time",
1281 "description":"date in UTC when toekn expires"
1281 "description":"date in UTC when toekn expires"
1282 }
1282 }
1283 }
1283 }
1284 },
1284 },
1285− "400":{
1285+ "400":{
1286 "description":"Invalid username/password supplied"
1286 "description":"Invalid username/password supplied"
1287 }
1287 }
1288 }
1288 }
1289 }
1289 }
1290 },
1290 },
1291− "/user/logout":{
1291+ "/user/logout":{
1292− "get":{
1292+ "get":{
1293− "tags":[
1293+ "tags":[
1294 "user"
1294 "user"
1295 ],
1295 ],
1296 "summary":"Logs out current logged in user session",
1296 "summary":"Logs out current logged in user session",
1297 "description":"",
1297 "description":"",
1298 "operationId":"logoutUser",
1298 "operationId":"logoutUser",
1299− "produces":[
1299+ "produces":[
1300 "application/xml",
1300 "application/xml",
1301 "application/json"
1301 "application/json"
1302 ],
1302 ],
1303 "parameters": [],
1303 "parameters": [],
1304− "responses":{
1304+ "responses":{
1305− "default":{
1305+ "default":{
1306 "description":"successful operation"
1306 "description":"successful operation"
1307 }
1307 }
1308 }
1308 }
1309 }
1309 }
1310 },
1310 },
1311− "/user/{username}":{
1311+ "/user/{username}":{
1312− "get":{
1312+ "get":{
1313− "tags":[
1313+ "tags":[
1314 "user"
1314 "user"
1315 ],
1315 ],
1316 "summary":"Get user by user name",
1316 "summary":"Get user by user name",
1317 "description":"",
1317 "description":"",
1318 "operationId":"getUserByName",
1318 "operationId":"getUserByName",
1319− "produces":[
1319+ "produces":[
1320 "application/xml",
1320 "application/xml",
1321 "application/json"
1321 "application/json"
1322 ],
1322 ],
1323− "parameters":[
1323+ "parameters":[
1324− {
1324+ {
1325 "name":"username",
1325 "name":"username",
1326 "in":"path",
1326 "in":"path",
1327 "description":"The name that needs to be fetched. Use user1 for testing. ",
1327 "description":"The name that needs to be fetched. Use user1 for testing. ",
@@ -1329,72 +1329,72 @@ petstoreExampleJSON = [aesonQQ|
1329 "type":"string"
1329 "type":"string"
1330 }
1330 }
1331 ],
1331 ],
1332− "responses":{
1332+ "responses":{
1333− "200":{
1333+ "200":{
1334 "description":"successful operation",
1334 "description":"successful operation",
1335− "schema":{
1335+ "schema":{
1336 "$ref":"#/definitions/User"
1336 "$ref":"#/definitions/User"
1337 }
1337 }
1338 },
1338 },
1339− "400":{
1339+ "400":{
1340 "description":"Invalid username supplied"
1340 "description":"Invalid username supplied"
1341 },
1341 },
1342− "404":{
1342+ "404":{
1343 "description":"User not found"
1343 "description":"User not found"
1344 }
1344 }
1345 }
1345 }
1346 },
1346 },
1347− "put":{
1347+ "put":{
1348− "tags":[
1348+ "tags":[
1349 "user"
1349 "user"
1350 ],
1350 ],
1351 "summary":"Updated user",
1351 "summary":"Updated user",
1352 "description":"This can only be done by the logged in user.",
1352 "description":"This can only be done by the logged in user.",
1353 "operationId":"updateUser",
1353 "operationId":"updateUser",
1354− "produces":[
1354+ "produces":[
1355 "application/xml",
1355 "application/xml",
1356 "application/json"
1356 "application/json"
1357 ],
1357 ],
1358− "parameters":[
1358+ "parameters":[
1359− {
1359+ {
1360 "name":"username",
1360 "name":"username",
1361 "in":"path",
1361 "in":"path",
1362 "description":"name that need to be deleted",
1362 "description":"name that need to be deleted",
1363 "required":true,
1363 "required":true,
1364 "type":"string"
1364 "type":"string"
1365 },
1365 },
1366− {
1366+ {
1367 "in":"body",
1367 "in":"body",
1368 "name":"body",
1368 "name":"body",
1369 "description":"Updated user object",
1369 "description":"Updated user object",
1370 "required":true,
1370 "required":true,
1371− "schema":{
1371+ "schema":{
1372 "$ref":"#/definitions/User"
1372 "$ref":"#/definitions/User"
1373 }
1373 }
1374 }
1374 }
1375 ],
1375 ],
1376− "responses":{
1376+ "responses":{
1377− "400":{
1377+ "400":{
1378 "description":"Invalid user supplied"
1378 "description":"Invalid user supplied"
1379 },
1379 },
1380− "404":{
1380+ "404":{
1381 "description":"User not found"
1381 "description":"User not found"
1382 }
1382 }
1383 }
1383 }
1384 },
1384 },
1385− "delete":{
1385+ "delete":{
1386− "tags":[
1386+ "tags":[
1387 "user"
1387 "user"
1388 ],
1388 ],
1389 "summary":"Delete user",
1389 "summary":"Delete user",
1390 "description":"This can only be done by the logged in user.",
1390 "description":"This can only be done by the logged in user.",
1391 "operationId":"deleteUser",
1391 "operationId":"deleteUser",
1392− "produces":[
1392+ "produces":[
1393 "application/xml",
1393 "application/xml",
1394 "application/json"
1394 "application/json"
1395 ],
1395 ],
1396− "parameters":[
1396+ "parameters":[
1397− {
1397+ {
1398 "name":"username",
1398 "name":"username",
1399 "in":"path",
1399 "in":"path",
1400 "description":"The name that needs to be deleted",
1400 "description":"The name that needs to be deleted",
@@ -1402,205 +1402,205 @@ petstoreExampleJSON = [aesonQQ|
1402 "type":"string"
1402 "type":"string"
1403 }
1403 }
1404 ],
1404 ],
1405− "responses":{
1405+ "responses":{
1406− "400":{
1406+ "400":{
1407 "description":"Invalid username supplied"
1407 "description":"Invalid username supplied"
1408 },
1408 },
1409− "404":{
1409+ "404":{
1410 "description":"User not found"
1410 "description":"User not found"
1411 }
1411 }
1412 }
1412 }
1413 }
1413 }
1414 }
1414 }
1415 },
1415 },
1416− "securityDefinitions":{
1416+ "securityDefinitions":{
1417− "petstore_auth":{
1417+ "petstore_auth":{
1418 "type":"oauth2",
1418 "type":"oauth2",
1419 "authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog",
1419 "authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog",
1420 "flow":"implicit",
1420 "flow":"implicit",
1421− "scopes":{
1421+ "scopes":{
1422 "write:pets":"modify pets in your account",
1422 "write:pets":"modify pets in your account",
1423 "read:pets":"read your pets"
1423 "read:pets":"read your pets"
1424 }
1424 }
1425 },
1425 },
1426− "api_key":{
1426+ "api_key":{
1427 "type":"apiKey",
1427 "type":"apiKey",
1428 "name":"api_key",
1428 "name":"api_key",
1429 "in":"header"
1429 "in":"header"
1430 }
1430 }
1431 },
1431 },
1432− "definitions":{
1432+ "definitions":{
1433− "Order":{
1433+ "Order":{
1434 "type":"object",
1434 "type":"object",
1435− "properties":{
1435+ "properties":{
1436− "id":{
1436+ "id":{
1437 "type":"integer",
1437 "type":"integer",
1438 "format":"int64"
1438 "format":"int64"
1439 },
1439 },
1440− "petId":{
1440+ "petId":{
1441 "type":"integer",
1441 "type":"integer",
1442 "format":"int64"
1442 "format":"int64"
1443 },
1443 },
1444− "quantity":{
1444+ "quantity":{
1445 "type":"integer",
1445 "type":"integer",
1446 "format":"int32"
1446 "format":"int32"
1447 },
1447 },
1448− "shipDate":{
1448+ "shipDate":{
1449 "type":"string",
1449 "type":"string",
1450 "format":"date-time"
1450 "format":"date-time"
1451 },
1451 },
1452− "status":{
1452+ "status":{
1453 "type":"string",
1453 "type":"string",
1454 "description":"Order Status",
1454 "description":"Order Status",
1455− "enum":[
1455+ "enum":[
1456 "placed",
1456 "placed",
1457 "approved",
1457 "approved",
1458 "delivered"
1458 "delivered"
1459 ]
1459 ]
1460 },
1460 },
1461− "complete":{
1461+ "complete":{
1462 "type":"boolean",
1462 "type":"boolean",
1463 "default":false
1463 "default":false
1464 }
1464 }
1465 },
1465 },
1466− "xml":{
1466+ "xml":{
1467 "name":"Order"
1467 "name":"Order"
1468 }
1468 }
1469 },
1469 },
1470− "Category":{
1470+ "Category":{
1471 "type":"object",
1471 "type":"object",
1472− "properties":{
1472+ "properties":{
1473− "id":{
1473+ "id":{
1474 "type":"integer",
1474 "type":"integer",
1475 "format":"int64"
1475 "format":"int64"
1476 },
1476 },
1477− "name":{
1477+ "name":{
1478 "type":"string"
1478 "type":"string"
1479 }
1479 }
1480 },
1480 },
1481− "xml":{
1481+ "xml":{
1482 "name":"Category"
1482 "name":"Category"
1483 }
1483 }
1484 },
1484 },
1485− "User":{
1485+ "User":{
1486 "type":"object",
1486 "type":"object",
1487− "properties":{
1487+ "properties":{
1488− "id":{
1488+ "id":{
1489 "type":"integer",
1489 "type":"integer",
1490 "format":"int64"
1490 "format":"int64"
1491 },
1491 },
1492− "username":{
1492+ "username":{
1493 "type":"string"
1493 "type":"string"
1494 },
1494 },
1495− "firstName":{
1495+ "firstName":{
1496 "type":"string"
1496 "type":"string"
1497 },
1497 },
1498− "lastName":{
1498+ "lastName":{
1499 "type":"string"
1499 "type":"string"
1500 },
1500 },
1501− "email":{
1501+ "email":{
1502 "type":"string"
1502 "type":"string"
1503 },
1503 },
1504− "password":{
1504+ "password":{
1505 "type":"string"
1505 "type":"string"
1506 },
1506 },
1507− "phone":{
1507+ "phone":{
1508 "type":"string"
1508 "type":"string"
1509 },
1509 },
1510− "userStatus":{
1510+ "userStatus":{
1511 "type":"integer",
1511 "type":"integer",
1512 "format":"int32",
1512 "format":"int32",
1513 "description":"User Status"
1513 "description":"User Status"
1514 }
1514 }
1515 },
1515 },
1516− "xml":{
1516+ "xml":{
1517 "name":"User"
1517 "name":"User"
1518 }
1518 }
1519 },
1519 },
1520− "Tag":{
1520+ "Tag":{
1521 "type":"object",
1521 "type":"object",
1522− "properties":{
1522+ "properties":{
1523− "id":{
1523+ "id":{
1524 "type":"integer",
1524 "type":"integer",
1525 "format":"int64"
1525 "format":"int64"
1526 },
1526 },
1527− "name":{
1527+ "name":{
1528 "type":"string"
1528 "type":"string"
1529 }
1529 }
1530 },
1530 },
1531− "xml":{
1531+ "xml":{
1532 "name":"Tag"
1532 "name":"Tag"
1533 }
1533 }
1534 },
1534 },
1535− "Pet":{
1535+ "Pet":{
1536 "type":"object",
1536 "type":"object",
1537− "required":[
1537+ "required":[
1538 "name",
1538 "name",
1539 "photoUrls"
1539 "photoUrls"
1540 ],
1540 ],
1541− "properties":{
1541+ "properties":{
1542− "id":{
1542+ "id":{
1543 "type":"integer",
1543 "type":"integer",
1544 "format":"int64"
1544 "format":"int64"
1545 },
1545 },
1546− "category":{
1546+ "category":{
1547 "$ref":"#/definitions/Category"
1547 "$ref":"#/definitions/Category"
1548 },
1548 },
1549− "name":{
1549+ "name":{
1550 "type":"string",
1550 "type":"string",
1551 "example":"doggie"
1551 "example":"doggie"
1552 },
1552 },
1553− "photoUrls":{
1553+ "photoUrls":{
1554 "type":"array",
1554 "type":"array",
1555− "xml":{
1555+ "xml":{
1556 "name":"photoUrl",
1556 "name":"photoUrl",
1557 "wrapped":true
1557 "wrapped":true
1558 },
1558 },
1559− "items":{
1559+ "items":{
1560 "type":"string"
1560 "type":"string"
1561 }
1561 }
1562 },
1562 },
1563− "tags":{
1563+ "tags":{
1564 "type":"array",
1564 "type":"array",
1565− "xml":{
1565+ "xml":{
1566 "name":"tag",
1566 "name":"tag",
1567 "wrapped":true
1567 "wrapped":true
1568 },
1568 },
1569− "items":{
1569+ "items":{
1570 "$ref":"#/definitions/Tag"
1570 "$ref":"#/definitions/Tag"
1571 }
1571 }
1572 },
1572 },
1573− "status":{
1573+ "status":{
1574 "type":"string",
1574 "type":"string",
1575 "description":"pet status in the store",
1575 "description":"pet status in the store",
1576− "enum":[
1576+ "enum":[
1577 "available",
1577 "available",
1578 "pending",
1578 "pending",
1579 "sold"
1579 "sold"
1580 ]
1580 ]
1581 }
1581 }
1582 },
1582 },
1583− "xml":{
1583+ "xml":{
1584 "name":"Pet"
1584 "name":"Pet"
1585 }
1585 }
1586 },
1586 },
1587− "ApiResponse":{
1587+ "ApiResponse":{
1588 "type":"object",
1588 "type":"object",
1589− "properties":{
1589+ "properties":{
1590− "code":{
1590+ "code":{
1591 "type":"integer",
1591 "type":"integer",
1592 "format":"int32"
1592 "format":"int32"
1593 },
1593 },
1594− "type":{
1594+ "type":{
1595 "type":"string"
1595 "type":"string"
1596 },
1596 },
1597− "message":{
1597+ "message":{
1598 "type":"string"
1598 "type":"string"
1599 }
1599 }
1600 }
1600 }
1601 }
1601 }
1602 },
1602 },
1603− "externalDocs":{
1603+ "externalDocs":{
1604 "description":"Find out more about Swagger",
1604 "description":"Find out more about Swagger",
1605 "url":"http://swagger.io"
1605 "url":"http://swagger.io"
1606 }
1606 }