...
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 "$ref": "#/responses/petListResponse"
33 }
34 }
35 }
36 }
37 },
38 "responses": {
39 "petListResponse": {
40 "description": "Pets list",
41 "schema": {
42 "type": "array",
43 "items": {
44 "$ref": "#/definitions/Pet"
45 }
46 },
47 "examples": {
48 "application/json": [{
49 "id": 123,
50 "photoUrls": [
51 "https://cloud.githubusercontent.com/assets/987686/9987390/24bd7be0-607a-11e5-9c3a-e0c6f333a764.png"
52 ],
53 "name": "issue 63 response ref example"
54 }]
55 }
56 }
57 },
58 "definitions": {
59 "Parent": {
60 "$ref": "#/definitions/Category"
61 },
62 "Category": {
63 "properties": {
64 "id": {
65 "type": "integer",
66 "format": "int64"
67 },
68 "name": {
69 "type": "string"
70 }
71 }
72 },
73 "Pet": {
74 "required": [
75 "name",
76 "photoUrls"
77 ],
78 "properties": {
79 "id": {
80 "type": "integer",
81 "format": "int64"
82 },
83 "category": {
84 "$ref": "#/definitions/Category"
85 },
86 "name": {
87 "type": "string",
88 "example": "doggie"
89 },
90 "photoUrls": {
91 "type": "array",
92 "items": {
93 "type": "string"
94 }
95 },
96 "tags": {
97 "type": "array",
98 "items": {
99 "$ref": "#/definitions/Tag"
100 }
101 },
102 "status": {
103 "type": "string",
104 "description": "pet status in the store"
105 }
106 }
107 },
108 "Tag": {
109 "properties": {
110 "id": {
111 "type": "integer",
112 "format": "int64"
113 },
114 "name": {
115 "type": "string"
116 }
117 }
118 }
119 }
120}
View as plain text