git.iko.soy/typeable/swagger2
on master help sign in
remove trailing whitespace
commitc330fd906ad48101cca4c13b7700394b4e49c0a9 authorSönke Hahn <soenkehahn@gmail.com> dateFri 4 Mar 2016, 11:02 (11 years ago) parentd70ddf0
1 file changed+298−298
test/Data/SwaggerSpec.hs+298−298
test/Data/SwaggerSpec.hs+298−298
@@ -493,7 +493,7 @@ swaggerExample = mempty
493493 "created": 100,
494494 "description": "get milk"
495495 } |]
496− & description ?~ "This is some real Todo right here"
496+ & description ?~ "This is some real Todo right here"
497497 & properties .~
498498 [ ("created", Inline $ mempty
499499 & type_ .~ SwaggerInteger
@@ -575,130 +575,130 @@ swaggerExampleJSON = [aesonQQ|
575575
576576petstoreExampleJSON :: Value
577577petstoreExampleJSON = [aesonQQ|
578−{
578+{
579579 "swagger":"2.0",
580− "info":{
580+ "info":{
581581 "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.",
582582 "version":"1.0.0",
583583 "title":"Swagger Petstore",
584584 "termsOfService":"http://swagger.io/terms/",
585− "contact":{
585+ "contact":{
586586 "email":"apiteam@swagger.io"
587587 },
588− "license":{
588+ "license":{
589589 "name":"Apache 2.0",
590590 "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
591591 }
592592 },
593593 "host":"petstore.swagger.io",
594594 "basePath":"/v2",
595− "tags":[
596− {
595+ "tags":[
596+ {
597597 "name":"pet",
598598 "description":"Everything about your Pets",
599− "externalDocs":{
599+ "externalDocs":{
600600 "description":"Find out more",
601601 "url":"http://swagger.io"
602602 }
603603 },
604− {
604+ {
605605 "name":"store",
606606 "description":"Access to Petstore orders"
607607 },
608− {
608+ {
609609 "name":"user",
610610 "description":"Operations about user",
611− "externalDocs":{
611+ "externalDocs":{
612612 "description":"Find out more about our store",
613613 "url":"http://swagger.io"
614614 }
615615 }
616616 ],
617− "schemes":[
617+ "schemes":[
618618 "http"
619619 ],
620− "paths":{
621− "/pet":{
622− "post":{
623− "tags":[
620+ "paths":{
621+ "/pet":{
622+ "post":{
623+ "tags":[
624624 "pet"
625625 ],
626626 "summary":"Add a new pet to the store",
627627 "description":"",
628628 "operationId":"addPet",
629− "consumes":[
629+ "consumes":[
630630 "application/json",
631631 "application/xml"
632632 ],
633− "produces":[
633+ "produces":[
634634 "application/xml",
635635 "application/json"
636636 ],
637− "parameters":[
638− {
637+ "parameters":[
638+ {
639639 "in":"body",
640640 "name":"body",
641641 "description":"Pet object that needs to be added to the store",
642642 "required":true,
643− "schema":{
643+ "schema":{
644644 "$ref":"#/definitions/Pet"
645645 }
646646 }
647647 ],
648− "responses":{
649− "405":{
648+ "responses":{
649+ "405":{
650650 "description":"Invalid input"
651651 }
652652 },
653− "security":[
654− {
655− "petstore_auth":[
653+ "security":[
654+ {
655+ "petstore_auth":[
656656 "write:pets",
657657 "read:pets"
658658 ]
659659 }
660660 ]
661661 },
662− "put":{
663− "tags":[
662+ "put":{
663+ "tags":[
664664 "pet"
665665 ],
666666 "summary":"Update an existing pet",
667667 "description":"",
668668 "operationId":"updatePet",
669− "consumes":[
669+ "consumes":[
670670 "application/json",
671671 "application/xml"
672672 ],
673− "produces":[
673+ "produces":[
674674 "application/xml",
675675 "application/json"
676676 ],
677− "parameters":[
678− {
677+ "parameters":[
678+ {
679679 "in":"body",
680680 "name":"body",
681681 "description":"Pet object that needs to be added to the store",
682682 "required":true,
683− "schema":{
683+ "schema":{
684684 "$ref":"#/definitions/Pet"
685685 }
686686 }
687687 ],
688− "responses":{
689− "400":{
688+ "responses":{
689+ "400":{
690690 "description":"Invalid ID supplied"
691691 },
692− "404":{
692+ "404":{
693693 "description":"Pet not found"
694694 },
695− "405":{
695+ "405":{
696696 "description":"Validation exception"
697697 }
698698 },
699− "security":[
700− {
701− "petstore_auth":[
699+ "security":[
700+ {
701+ "petstore_auth":[
702702 "write:pets",
703703 "read:pets"
704704 ]
@@ -706,28 +706,28 @@ petstoreExampleJSON = [aesonQQ|
706706 ]
707707 }
708708 },
709− "/pet/findByStatus":{
710− "get":{
711− "tags":[
709+ "/pet/findByStatus":{
710+ "get":{
711+ "tags":[
712712 "pet"
713713 ],
714714 "summary":"Finds Pets by status",
715715 "description":"Multiple status values can be provided with comma seperated strings",
716716 "operationId":"findPetsByStatus",
717− "produces":[
717+ "produces":[
718718 "application/xml",
719719 "application/json"
720720 ],
721− "parameters":[
722− {
721+ "parameters":[
722+ {
723723 "name":"status",
724724 "in":"query",
725725 "description":"Status values that need to be considered for filter",
726726 "required":true,
727727 "type":"array",
728− "items":{
728+ "items":{
729729 "type":"string",
730− "enum":[
730+ "enum":[
731731 "available",
732732 "pending",
733733 "sold"
@@ -737,23 +737,23 @@ petstoreExampleJSON = [aesonQQ|
737737 "collectionFormat":"csv"
738738 }
739739 ],
740− "responses":{
741− "200":{
740+ "responses":{
741+ "200":{
742742 "description":"successful operation",
743− "schema":{
743+ "schema":{
744744 "type":"array",
745− "items":{
745+ "items":{
746746 "$ref":"#/definitions/Pet"
747747 }
748748 }
749749 },
750− "400":{
750+ "400":{
751751 "description":"Invalid status value"
752752 }
753753 },
754− "security":[
755− {
756− "petstore_auth":[
754+ "security":[
755+ {
756+ "petstore_auth":[
757757 "write:pets",
758758 "read:pets"
759759 ]
@@ -761,48 +761,48 @@ petstoreExampleJSON = [aesonQQ|
761761 ]
762762 }
763763 },
764− "/pet/findByTags":{
765− "get":{
766− "tags":[
764+ "/pet/findByTags":{
765+ "get":{
766+ "tags":[
767767 "pet"
768768 ],
769769 "summary":"Finds Pets by tags",
770770 "description":"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
771771 "operationId":"findPetsByTags",
772− "produces":[
772+ "produces":[
773773 "application/xml",
774774 "application/json"
775775 ],
776− "parameters":[
777− {
776+ "parameters":[
777+ {
778778 "name":"tags",
779779 "in":"query",
780780 "description":"Tags to filter by",
781781 "required":true,
782782 "type":"array",
783− "items":{
783+ "items":{
784784 "type":"string"
785785 },
786786 "collectionFormat":"csv"
787787 }
788788 ],
789− "responses":{
790− "200":{
789+ "responses":{
790+ "200":{
791791 "description":"successful operation",
792− "schema":{
792+ "schema":{
793793 "type":"array",
794− "items":{
794+ "items":{
795795 "$ref":"#/definitions/Pet"
796796 }
797797 }
798798 },
799− "400":{
799+ "400":{
800800 "description":"Invalid tag value"
801801 }
802802 },
803− "security":[
804− {
805− "petstore_auth":[
803+ "security":[
804+ {
805+ "petstore_auth":[
806806 "write:pets",
807807 "read:pets"
808808 ]
@@ -810,20 +810,20 @@ petstoreExampleJSON = [aesonQQ|
810810 ]
811811 }
812812 },
813− "/pet/{petId}":{
814− "get":{
815− "tags":[
813+ "/pet/{petId}":{
814+ "get":{
815+ "tags":[
816816 "pet"
817817 ],
818818 "summary":"Find pet by ID",
819819 "description":"Returns a single pet",
820820 "operationId":"getPetById",
821− "produces":[
821+ "produces":[
822822 "application/xml",
823823 "application/json"
824824 ],
825− "parameters":[
826− {
825+ "parameters":[
826+ {
827827 "name":"petId",
828828 "in":"path",
829829 "description":"ID of pet to return",
@@ -832,42 +832,42 @@ petstoreExampleJSON = [aesonQQ|
832832 "format":"int64"
833833 }
834834 ],
835− "responses":{
836− "200":{
835+ "responses":{
836+ "200":{
837837 "description":"successful operation",
838− "schema":{
838+ "schema":{
839839 "$ref":"#/definitions/Pet"
840840 }
841841 },
842− "400":{
842+ "400":{
843843 "description":"Invalid ID supplied"
844844 },
845− "404":{
845+ "404":{
846846 "description":"Pet not found"
847847 }
848848 },
849− "security":[
850− {
849+ "security":[
850+ {
851851 "api_key": []
852852 }
853853 ]
854854 },
855− "post":{
856− "tags":[
855+ "post":{
856+ "tags":[
857857 "pet"
858858 ],
859859 "summary":"Updates a pet in the store with form data",
860860 "description":"",
861861 "operationId":"updatePetWithForm",
862− "consumes":[
862+ "consumes":[
863863 "application/x-www-form-urlencoded"
864864 ],
865− "produces":[
865+ "produces":[
866866 "application/xml",
867867 "application/json"
868868 ],
869− "parameters":[
870− {
869+ "parameters":[
870+ {
871871 "name":"petId",
872872 "in":"path",
873873 "description":"ID of pet that needs to be updated",
@@ -875,14 +875,14 @@ petstoreExampleJSON = [aesonQQ|
875875 "type":"integer",
876876 "format":"int64"
877877 },
878− {
878+ {
879879 "name":"name",
880880 "in":"formData",
881881 "description":"Updated name of the pet",
882882 "required":false,
883883 "type":"string"
884884 },
885− {
885+ {
886886 "name":"status",
887887 "in":"formData",
888888 "description":"Updated status of the pet",
@@ -890,39 +890,39 @@ petstoreExampleJSON = [aesonQQ|
890890 "type":"string"
891891 }
892892 ],
893− "responses":{
894− "405":{
893+ "responses":{
894+ "405":{
895895 "description":"Invalid input"
896896 }
897897 },
898− "security":[
899− {
900− "petstore_auth":[
898+ "security":[
899+ {
900+ "petstore_auth":[
901901 "write:pets",
902902 "read:pets"
903903 ]
904904 }
905905 ]
906906 },
907− "delete":{
908− "tags":[
907+ "delete":{
908+ "tags":[
909909 "pet"
910910 ],
911911 "summary":"Deletes a pet",
912912 "description":"",
913913 "operationId":"deletePet",
914− "produces":[
914+ "produces":[
915915 "application/xml",
916916 "application/json"
917917 ],
918− "parameters":[
919− {
918+ "parameters":[
919+ {
920920 "name":"api_key",
921921 "in":"header",
922922 "required":false,
923923 "type":"string"
924924 },
925− {
925+ {
926926 "name":"petId",
927927 "in":"path",
928928 "description":"Pet id to delete",
@@ -931,14 +931,14 @@ petstoreExampleJSON = [aesonQQ|
931931 "format":"int64"
932932 }
933933 ],
934− "responses":{
935− "400":{
934+ "responses":{
935+ "400":{
936936 "description":"Invalid pet value"
937937 }
938938 },
939− "security":[
940− {
941− "petstore_auth":[
939+ "security":[
940+ {
941+ "petstore_auth":[
942942 "write:pets",
943943 "read:pets"
944944 ]
@@ -946,22 +946,22 @@ petstoreExampleJSON = [aesonQQ|
946946 ]
947947 }
948948 },
949− "/pet/{petId}/uploadImage":{
950− "post":{
951− "tags":[
949+ "/pet/{petId}/uploadImage":{
950+ "post":{
951+ "tags":[
952952 "pet"
953953 ],
954954 "summary":"uploads an image",
955955 "description":"",
956956 "operationId":"uploadFile",
957− "consumes":[
957+ "consumes":[
958958 "multipart/form-data"
959959 ],
960− "produces":[
960+ "produces":[
961961 "application/json"
962962 ],
963− "parameters":[
964− {
963+ "parameters":[
964+ {
965965 "name":"petId",
966966 "in":"path",
967967 "description":"ID of pet to update",
@@ -969,14 +969,14 @@ petstoreExampleJSON = [aesonQQ|
969969 "type":"integer",
970970 "format":"int64"
971971 },
972− {
972+ {
973973 "name":"additionalMetadata",
974974 "in":"formData",
975975 "description":"Additional data to pass to server",
976976 "required":false,
977977 "type":"string"
978978 },
979− {
979+ {
980980 "name":"file",
981981 "in":"formData",
982982 "description":"file to upload",
@@ -984,17 +984,17 @@ petstoreExampleJSON = [aesonQQ|
984984 "type":"file"
985985 }
986986 ],
987− "responses":{
988− "200":{
987+ "responses":{
988+ "200":{
989989 "description":"successful operation",
990− "schema":{
990+ "schema":{
991991 "$ref":"#/definitions/ApiResponse"
992992 }
993993 }
994994 },
995− "security":[
996− {
997− "petstore_auth":[
995+ "security":[
996+ {
997+ "petstore_auth":[
998998 "write:pets",
999999 "read:pets"
10001000 ]
@@ -1002,87 +1002,87 @@ petstoreExampleJSON = [aesonQQ|
10021002 ]
10031003 }
10041004 },
1005− "/store/inventory":{
1006− "get":{
1007− "tags":[
1005+ "/store/inventory":{
1006+ "get":{
1007+ "tags":[
10081008 "store"
10091009 ],
10101010 "summary":"Returns pet inventories by status",
10111011 "description":"Returns a map of status codes to quantities",
10121012 "operationId":"getInventory",
1013− "produces":[
1013+ "produces":[
10141014 "application/json"
10151015 ],
10161016 "parameters": [],
1017− "responses":{
1018− "200":{
1017+ "responses":{
1018+ "200":{
10191019 "description":"successful operation",
1020− "schema":{
1020+ "schema":{
10211021 "type":"object",
1022− "additionalProperties":{
1022+ "additionalProperties":{
10231023 "type":"integer",
10241024 "format":"int32"
10251025 }
10261026 }
10271027 }
10281028 },
1029− "security":[
1030− {
1029+ "security":[
1030+ {
10311031 "api_key": []
10321032 }
10331033 ]
10341034 }
10351035 },
1036− "/store/order":{
1037− "post":{
1038− "tags":[
1036+ "/store/order":{
1037+ "post":{
1038+ "tags":[
10391039 "store"
10401040 ],
10411041 "summary":"Place an order for a pet",
10421042 "description":"",
10431043 "operationId":"placeOrder",
1044− "produces":[
1044+ "produces":[
10451045 "application/xml",
10461046 "application/json"
10471047 ],
1048− "parameters":[
1049− {
1048+ "parameters":[
1049+ {
10501050 "in":"body",
10511051 "name":"body",
10521052 "description":"order placed for purchasing the pet",
10531053 "required":true,
1054− "schema":{
1054+ "schema":{
10551055 "$ref":"#/definitions/Order"
10561056 }
10571057 }
10581058 ],
1059− "responses":{
1060− "200":{
1059+ "responses":{
1060+ "200":{
10611061 "description":"successful operation",
1062− "schema":{
1062+ "schema":{
10631063 "$ref":"#/definitions/Order"
10641064 }
10651065 },
1066− "400":{
1066+ "400":{
10671067 "description":"Invalid Order"
10681068 }
10691069 }
10701070 }
10711071 },
1072− "/store/order/{orderId}":{
1073− "get":{
1074− "tags":[
1072+ "/store/order/{orderId}":{
1073+ "get":{
1074+ "tags":[
10751075 "store"
10761076 ],
10771077 "summary":"Find purchase order by ID",
10781078 "description":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
10791079 "operationId":"getOrderById",
1080− "produces":[
1080+ "produces":[
10811081 "application/xml",
10821082 "application/json"
10831083 ],
1084− "parameters":[
1085− {
1084+ "parameters":[
1085+ {
10861086 "name":"orderId",
10871087 "in":"path",
10881088 "description":"ID of pet that needs to be fetched",
@@ -1093,34 +1093,34 @@ petstoreExampleJSON = [aesonQQ|
10931093 "format":"int64"
10941094 }
10951095 ],
1096− "responses":{
1097− "200":{
1096+ "responses":{
1097+ "200":{
10981098 "description":"successful operation",
1099− "schema":{
1099+ "schema":{
11001100 "$ref":"#/definitions/Order"
11011101 }
11021102 },
1103− "400":{
1103+ "400":{
11041104 "description":"Invalid ID supplied"
11051105 },
1106− "404":{
1106+ "404":{
11071107 "description":"Order not found"
11081108 }
11091109 }
11101110 },
1111− "delete":{
1112− "tags":[
1111+ "delete":{
1112+ "tags":[
11131113 "store"
11141114 ],
11151115 "summary":"Delete purchase order by ID",
11161116 "description":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
11171117 "operationId":"deleteOrder",
1118− "produces":[
1118+ "produces":[
11191119 "application/xml",
11201120 "application/json"
11211121 ],
1122− "parameters":[
1123− {
1122+ "parameters":[
1123+ {
11241124 "name":"orderId",
11251125 "in":"path",
11261126 "description":"ID of the order that needs to be deleted",
@@ -1129,133 +1129,133 @@ petstoreExampleJSON = [aesonQQ|
11291129 "minimum":1.0
11301130 }
11311131 ],
1132− "responses":{
1133− "400":{
1132+ "responses":{
1133+ "400":{
11341134 "description":"Invalid ID supplied"
11351135 },
1136− "404":{
1136+ "404":{
11371137 "description":"Order not found"
11381138 }
11391139 }
11401140 }
11411141 },
1142− "/user":{
1143− "post":{
1144− "tags":[
1142+ "/user":{
1143+ "post":{
1144+ "tags":[
11451145 "user"
11461146 ],
11471147 "summary":"Create user",
11481148 "description":"This can only be done by the logged in user.",
11491149 "operationId":"createUser",
1150− "produces":[
1150+ "produces":[
11511151 "application/xml",
11521152 "application/json"
11531153 ],
1154− "parameters":[
1155− {
1154+ "parameters":[
1155+ {
11561156 "in":"body",
11571157 "name":"body",
11581158 "description":"Created user object",
11591159 "required":true,
1160− "schema":{
1160+ "schema":{
11611161 "$ref":"#/definitions/User"
11621162 }
11631163 }
11641164 ],
1165− "responses":{
1166− "default":{
1165+ "responses":{
1166+ "default":{
11671167 "description":"successful operation"
11681168 }
11691169 }
11701170 }
11711171 },
1172− "/user/createWithArray":{
1173− "post":{
1174− "tags":[
1172+ "/user/createWithArray":{
1173+ "post":{
1174+ "tags":[
11751175 "user"
11761176 ],
11771177 "summary":"Creates list of users with given input array",
11781178 "description":"",
11791179 "operationId":"createUsersWithArrayInput",
1180− "produces":[
1180+ "produces":[
11811181 "application/xml",
11821182 "application/json"
11831183 ],
1184− "parameters":[
1185− {
1184+ "parameters":[
1185+ {
11861186 "in":"body",
11871187 "name":"body",
11881188 "description":"List of user object",
11891189 "required":true,
1190− "schema":{
1190+ "schema":{
11911191 "type":"array",
1192− "items":{
1192+ "items":{
11931193 "$ref":"#/definitions/User"
11941194 }
11951195 }
11961196 }
11971197 ],
1198− "responses":{
1199− "default":{
1198+ "responses":{
1199+ "default":{
12001200 "description":"successful operation"
12011201 }
12021202 }
12031203 }
12041204 },
1205− "/user/createWithList":{
1206− "post":{
1207− "tags":[
1205+ "/user/createWithList":{
1206+ "post":{
1207+ "tags":[
12081208 "user"
12091209 ],
12101210 "summary":"Creates list of users with given input array",
12111211 "description":"",
12121212 "operationId":"createUsersWithListInput",
1213− "produces":[
1213+ "produces":[
12141214 "application/xml",
12151215 "application/json"
12161216 ],
1217− "parameters":[
1218− {
1217+ "parameters":[
1218+ {
12191219 "in":"body",
12201220 "name":"body",
12211221 "description":"List of user object",
12221222 "required":true,
1223− "schema":{
1223+ "schema":{
12241224 "type":"array",
1225− "items":{
1225+ "items":{
12261226 "$ref":"#/definitions/User"
12271227 }
12281228 }
12291229 }
12301230 ],
1231− "responses":{
1232− "default":{
1231+ "responses":{
1232+ "default":{
12331233 "description":"successful operation"
12341234 }
12351235 }
12361236 }
12371237 },
1238− "/user/login":{
1239− "get":{
1240− "tags":[
1238+ "/user/login":{
1239+ "get":{
1240+ "tags":[
12411241 "user"
12421242 ],
12431243 "summary":"Logs user into the system",
12441244 "description":"",
12451245 "operationId":"loginUser",
1246− "produces":[
1246+ "produces":[
12471247 "application/xml",
12481248 "application/json"
12491249 ],
1250− "parameters":[
1251− {
1250+ "parameters":[
1251+ {
12521252 "name":"username",
12531253 "in":"query",
12541254 "description":"The user name for login",
12551255 "required":true,
12561256 "type":"string"
12571257 },
1258− {
1258+ {
12591259 "name":"password",
12601260 "in":"query",
12611261 "description":"The password for login in clear text",
@@ -1263,65 +1263,65 @@ petstoreExampleJSON = [aesonQQ|
12631263 "type":"string"
12641264 }
12651265 ],
1266− "responses":{
1267− "200":{
1266+ "responses":{
1267+ "200":{
12681268 "description":"successful operation",
1269− "schema":{
1269+ "schema":{
12701270 "type":"string"
12711271 },
1272− "headers":{
1273− "X-Rate-Limit":{
1272+ "headers":{
1273+ "X-Rate-Limit":{
12741274 "type":"integer",
12751275 "format":"int32",
12761276 "description":"calls per hour allowed by the user"
12771277 },
1278− "X-Expires-After":{
1278+ "X-Expires-After":{
12791279 "type":"string",
12801280 "format":"date-time",
12811281 "description":"date in UTC when toekn expires"
12821282 }
12831283 }
12841284 },
1285− "400":{
1285+ "400":{
12861286 "description":"Invalid username/password supplied"
12871287 }
12881288 }
12891289 }
12901290 },
1291− "/user/logout":{
1292− "get":{
1293− "tags":[
1291+ "/user/logout":{
1292+ "get":{
1293+ "tags":[
12941294 "user"
12951295 ],
12961296 "summary":"Logs out current logged in user session",
12971297 "description":"",
12981298 "operationId":"logoutUser",
1299− "produces":[
1299+ "produces":[
13001300 "application/xml",
13011301 "application/json"
13021302 ],
13031303 "parameters": [],
1304− "responses":{
1305− "default":{
1304+ "responses":{
1305+ "default":{
13061306 "description":"successful operation"
13071307 }
13081308 }
13091309 }
13101310 },
1311− "/user/{username}":{
1312− "get":{
1313− "tags":[
1311+ "/user/{username}":{
1312+ "get":{
1313+ "tags":[
13141314 "user"
13151315 ],
13161316 "summary":"Get user by user name",
13171317 "description":"",
13181318 "operationId":"getUserByName",
1319− "produces":[
1319+ "produces":[
13201320 "application/xml",
13211321 "application/json"
13221322 ],
1323− "parameters":[
1324− {
1323+ "parameters":[
1324+ {
13251325 "name":"username",
13261326 "in":"path",
13271327 "description":"The name that needs to be fetched. Use user1 for testing. ",
@@ -1329,72 +1329,72 @@ petstoreExampleJSON = [aesonQQ|
13291329 "type":"string"
13301330 }
13311331 ],
1332− "responses":{
1333− "200":{
1332+ "responses":{
1333+ "200":{
13341334 "description":"successful operation",
1335− "schema":{
1335+ "schema":{
13361336 "$ref":"#/definitions/User"
13371337 }
13381338 },
1339− "400":{
1339+ "400":{
13401340 "description":"Invalid username supplied"
13411341 },
1342− "404":{
1342+ "404":{
13431343 "description":"User not found"
13441344 }
13451345 }
13461346 },
1347− "put":{
1348− "tags":[
1347+ "put":{
1348+ "tags":[
13491349 "user"
13501350 ],
13511351 "summary":"Updated user",
13521352 "description":"This can only be done by the logged in user.",
13531353 "operationId":"updateUser",
1354− "produces":[
1354+ "produces":[
13551355 "application/xml",
13561356 "application/json"
13571357 ],
1358− "parameters":[
1359− {
1358+ "parameters":[
1359+ {
13601360 "name":"username",
13611361 "in":"path",
13621362 "description":"name that need to be deleted",
13631363 "required":true,
13641364 "type":"string"
13651365 },
1366− {
1366+ {
13671367 "in":"body",
13681368 "name":"body",
13691369 "description":"Updated user object",
13701370 "required":true,
1371− "schema":{
1371+ "schema":{
13721372 "$ref":"#/definitions/User"
13731373 }
13741374 }
13751375 ],
1376− "responses":{
1377− "400":{
1376+ "responses":{
1377+ "400":{
13781378 "description":"Invalid user supplied"
13791379 },
1380− "404":{
1380+ "404":{
13811381 "description":"User not found"
13821382 }
13831383 }
13841384 },
1385− "delete":{
1386− "tags":[
1385+ "delete":{
1386+ "tags":[
13871387 "user"
13881388 ],
13891389 "summary":"Delete user",
13901390 "description":"This can only be done by the logged in user.",
13911391 "operationId":"deleteUser",
1392− "produces":[
1392+ "produces":[
13931393 "application/xml",
13941394 "application/json"
13951395 ],
1396− "parameters":[
1397− {
1396+ "parameters":[
1397+ {
13981398 "name":"username",
13991399 "in":"path",
14001400 "description":"The name that needs to be deleted",
@@ -1402,205 +1402,205 @@ petstoreExampleJSON = [aesonQQ|
14021402 "type":"string"
14031403 }
14041404 ],
1405− "responses":{
1406− "400":{
1405+ "responses":{
1406+ "400":{
14071407 "description":"Invalid username supplied"
14081408 },
1409− "404":{
1409+ "404":{
14101410 "description":"User not found"
14111411 }
14121412 }
14131413 }
14141414 }
14151415 },
1416− "securityDefinitions":{
1417− "petstore_auth":{
1416+ "securityDefinitions":{
1417+ "petstore_auth":{
14181418 "type":"oauth2",
14191419 "authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog",
14201420 "flow":"implicit",
1421− "scopes":{
1421+ "scopes":{
14221422 "write:pets":"modify pets in your account",
14231423 "read:pets":"read your pets"
14241424 }
14251425 },
1426− "api_key":{
1426+ "api_key":{
14271427 "type":"apiKey",
14281428 "name":"api_key",
14291429 "in":"header"
14301430 }
14311431 },
1432− "definitions":{
1433− "Order":{
1432+ "definitions":{
1433+ "Order":{
14341434 "type":"object",
1435− "properties":{
1436− "id":{
1435+ "properties":{
1436+ "id":{
14371437 "type":"integer",
14381438 "format":"int64"
14391439 },
1440− "petId":{
1440+ "petId":{
14411441 "type":"integer",
14421442 "format":"int64"
14431443 },
1444− "quantity":{
1444+ "quantity":{
14451445 "type":"integer",
14461446 "format":"int32"
14471447 },
1448− "shipDate":{
1448+ "shipDate":{
14491449 "type":"string",
14501450 "format":"date-time"
14511451 },
1452− "status":{
1452+ "status":{
14531453 "type":"string",
14541454 "description":"Order Status",
1455− "enum":[
1455+ "enum":[
14561456 "placed",
14571457 "approved",
14581458 "delivered"
14591459 ]
14601460 },
1461− "complete":{
1461+ "complete":{
14621462 "type":"boolean",
14631463 "default":false
14641464 }
14651465 },
1466− "xml":{
1466+ "xml":{
14671467 "name":"Order"
14681468 }
14691469 },
1470− "Category":{
1470+ "Category":{
14711471 "type":"object",
1472− "properties":{
1473− "id":{
1472+ "properties":{
1473+ "id":{
14741474 "type":"integer",
14751475 "format":"int64"
14761476 },
1477− "name":{
1477+ "name":{
14781478 "type":"string"
14791479 }
14801480 },
1481− "xml":{
1481+ "xml":{
14821482 "name":"Category"
14831483 }
14841484 },
1485− "User":{
1485+ "User":{
14861486 "type":"object",
1487− "properties":{
1488− "id":{
1487+ "properties":{
1488+ "id":{
14891489 "type":"integer",
14901490 "format":"int64"
14911491 },
1492− "username":{
1492+ "username":{
14931493 "type":"string"
14941494 },
1495− "firstName":{
1495+ "firstName":{
14961496 "type":"string"
14971497 },
1498− "lastName":{
1498+ "lastName":{
14991499 "type":"string"
15001500 },
1501− "email":{
1501+ "email":{
15021502 "type":"string"
15031503 },
1504− "password":{
1504+ "password":{
15051505 "type":"string"
15061506 },
1507− "phone":{
1507+ "phone":{
15081508 "type":"string"
15091509 },
1510− "userStatus":{
1510+ "userStatus":{
15111511 "type":"integer",
15121512 "format":"int32",
15131513 "description":"User Status"
15141514 }
15151515 },
1516− "xml":{
1516+ "xml":{
15171517 "name":"User"
15181518 }
15191519 },
1520− "Tag":{
1520+ "Tag":{
15211521 "type":"object",
1522− "properties":{
1523− "id":{
1522+ "properties":{
1523+ "id":{
15241524 "type":"integer",
15251525 "format":"int64"
15261526 },
1527− "name":{
1527+ "name":{
15281528 "type":"string"
15291529 }
15301530 },
1531− "xml":{
1531+ "xml":{
15321532 "name":"Tag"
15331533 }
15341534 },
1535− "Pet":{
1535+ "Pet":{
15361536 "type":"object",
1537− "required":[
1537+ "required":[
15381538 "name",
15391539 "photoUrls"
15401540 ],
1541− "properties":{
1542− "id":{
1541+ "properties":{
1542+ "id":{
15431543 "type":"integer",
15441544 "format":"int64"
15451545 },
1546− "category":{
1546+ "category":{
15471547 "$ref":"#/definitions/Category"
15481548 },
1549− "name":{
1549+ "name":{
15501550 "type":"string",
15511551 "example":"doggie"
15521552 },
1553− "photoUrls":{
1553+ "photoUrls":{
15541554 "type":"array",
1555− "xml":{
1555+ "xml":{
15561556 "name":"photoUrl",
15571557 "wrapped":true
15581558 },
1559− "items":{
1559+ "items":{
15601560 "type":"string"
15611561 }
15621562 },
1563− "tags":{
1563+ "tags":{
15641564 "type":"array",
1565− "xml":{
1565+ "xml":{
15661566 "name":"tag",
15671567 "wrapped":true
15681568 },
1569− "items":{
1569+ "items":{
15701570 "$ref":"#/definitions/Tag"
15711571 }
15721572 },
1573− "status":{
1573+ "status":{
15741574 "type":"string",
15751575 "description":"pet status in the store",
1576− "enum":[
1576+ "enum":[
15771577 "available",
15781578 "pending",
15791579 "sold"
15801580 ]
15811581 }
15821582 },
1583− "xml":{
1583+ "xml":{
15841584 "name":"Pet"
15851585 }
15861586 },
1587− "ApiResponse":{
1587+ "ApiResponse":{
15881588 "type":"object",
1589− "properties":{
1590− "code":{
1589+ "properties":{
1590+ "code":{
15911591 "type":"integer",
15921592 "format":"int32"
15931593 },
1594− "type":{
1594+ "type":{
15951595 "type":"string"
15961596 },
1597− "message":{
1597+ "message":{
15981598 "type":"string"
15991599 }
16001600 }
16011601 }
16021602 },
1603− "externalDocs":{
1603+ "externalDocs":{
16041604 "description":"Find out more about Swagger",
16051605 "url":"http://swagger.io"
16061606 }