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 "schema": {
31 "$ref": "#/definitions/WrongTag"
32 }
33 },
34 "200": {
35 "description": "Pets list",
36 "schema": {
37 "type": "array",
38 "items": {
39 "$ref": "#/definitions/Pet"
40 }
41 }
42 }
43 }
44 }
45 }
46 },
47 "definitions": {
48 "Parent": {
49 "$ref": "#/definitions/Category"
50 },
51 "Category": {
52 "properties": {
53 "id": {
54 "type": "integer",
55 "format": "int64"
56 },
57 "name": {
58 "type": "string"
59 }
60 }
61 },
62 "Pet": {
63 "required": [
64 "name",
65 "photoUrls"
66 ],
67 "properties": {
68 "id": {
69 "type": "integer",
70 "format": "int64"
71 },
72 "category": {
73 "$ref": "#/definitions/Category"
74 },
75 "name": {
76 "type": "string",
77 "example": "doggie"
78 },
79 "photoUrls": {
80 "type": "array",
81 "items": {
82 "type": "string"
83 }
84 },
85 "tags": {
86 "type": "array",
87 "items": {
88 "$ref": "#/definitions/Tag"
89 }
90 },
91 "status": {
92 "type": "string",
93 "description": "pet status in the store"
94 }
95 }
96 },
97 "Tag": {
98 "properties": {
99 "id": {
100 "type": "integer",
101 "format": "int64"
102 },
103 "name": {
104 "type": "string"
105 }
106 },
107 "patternProperties": {
108 "nb-.*": {
109 "type": "integer",
110 "format": "int64",
111 "example": 20
112 }
113 }
114
115 },
116 "WrongTag": {
117 "type": "object",
118 "properties": {
119 "id": {
120 "type": "integer",
121 "format": "int64"
122 },
123 "name": {
124 "type": "string"
125 }
126 },
127 "patternProperties": {
128 "nb-.*": {
129 "type": "integer",
130 "format": "int64",
131 "example": 20
132 }
133 }
134
135 }
136 }
137}
View as plain text