1{
2 "swagger": "2.0",
3 "info": {
4 "description": "This is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n",
5 "version": "1.0.0",
6 "title": "Swagger Petstore",
7 "termsOfService": "http://helloreverb.com/terms/",
8 "contact": {
9 "name": "apiteam@wordnik.com"
10 },
11 "license": {
12 "name": "Apache 2.0",
13 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
14 }
15 },
16 "host": "petstore.swagger.wordnik.com",
17 "basePath": "/v2",
18 "schemes": [
19 "http"
20 ],
21 "paths": {
22 "/pets": {
23 "get": {
24 "tags": ["pet"],
25 "summary": "list the pets",
26 "operationId": "getPets",
27 "responses": {
28 "default": {
29 "description": "Generic Error"
30 },
31 "200": {
32 "description": "Pets list",
33 "schema": {
34 "type": "array",
35 "items": {
36 "$ref": "#/definitions/Pet"
37 }
38 }
39 }
40 }
41 }
42 }
43 },
44 "definitions": {
45 "Parent": {
46 "$ref": "#/definitions/Category"
47 },
48 "Category": {
49 "properties": {
50 "id": {
51 "type": "integer",
52 "format": "int64"
53 },
54 "name": {
55 "type": "string"
56 }
57 }
58 },
59 "Pet": {
60 "required": [
61 "name",
62 "photoUrls"
63 ],
64 "properties": {
65 "id": {
66 "type": "integer",
67 "format": "int64"
68 },
69 "category": {
70 "$ref": "#/definitions/Category"
71 },
72 "name": {
73 "type": "string",
74 "example": "doggie"
75 },
76 "photoUrls": {
77 "type": "array",
78 "items": {
79 "type": "string"
80 }
81 },
82 "tags": {
83 "type": "array",
84 "items": {
85 "$ref": "#/definitions/Tag"
86 }
87 },
88 "badtags": {
89 "type": "array",
90 "items": {
91 "$ref": "#/definitions/TagWrong"
92 }
93 },
94 "invalidDefault": {
95 "$ref": "#/definitions/TagInvalidDefault"
96 },
97 "status": {
98 "type": "string",
99 "description": "pet status in the store"
100 }
101 }
102 },
103 "Tag": {
104 "properties": {
105 "id": {
106 "type": "integer",
107 "format": "int64"
108 },
109 "name": {
110 "type": "string"
111 }
112 },
113 "patternProperties": {
114 "nb-.*": {
115 "type": "integer",
116 "format": "int64",
117 "default": 20
118 }
119 }
120
121 },
122 "TagInvalidDefault": {
123 "type": "object",
124 "description": "An object with default value not matching pattern properties",
125 "properties": {
126 "id": {
127 "type": "integer",
128 "format": "int64"
129 },
130 "name": {
131 "type": "string"
132 }
133 },
134 "patternProperties": {
135 "nb-.*": {
136 "type": "integer",
137 "format": "int64"
138 }
139 },
140 "default" : {
141 "id": "myid",
142 "name": "myname",
143 "nb-1": "a string",
144 "nb-2": "10"
145 }
146
147 },
148 "TagWrong": {
149 "type": "object",
150 "description": "An object with with a bad regexp in pattern properties",
151 "properties": {
152 "id": {
153 "type": "integer",
154 "format": "int64"
155 },
156 "name": {
157 "type": "string"
158 }
159 },
160 "patternProperties": {
161 "nb-.*": {
162 "type": "integer",
163 "format": "int64",
164 "default": 20
165 }
166 }
167
168 }
169 }
170}
View as plain text