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