Skip to content

Commit a9e982a

Browse files
committed
Merge pull request #315 from swagger-api/2.0_fixes
2.0 fixes
2 parents 482fb30 + 299aecb commit a9e982a

13 files changed

+154
-140
lines changed

examples/v2.0/json/petstore-expanded.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
"version": "1.0.0",
55
"title": "Swagger Petstore",
66
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
7-
"termsOfService": "http://helloreverb.com/terms/",
7+
"termsOfService": "http://swagger.io/terms/",
88
"contact": {
9-
"name": "Wordnik API Team",
10-
"email": "[email protected]",
11-
"url": "http://madskristensen.net"
9+
"name": "Swagger API Team",
10+
"email": "[email protected]",
11+
"url": "http://swagger.io"
1212
},
1313
"license": {
1414
"name": "MIT",
1515
"url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT"
1616
}
1717
},
18-
"host": "petstore.swagger.wordnik.com",
18+
"host": "petstore.swagger.io",
1919
"basePath": "/api",
2020
"schemes": [
2121
"http"
@@ -64,14 +64,14 @@
6464
"schema": {
6565
"type": "array",
6666
"items": {
67-
"$ref": "#/definitions/pet"
67+
"$ref": "#/definitions/Pet"
6868
}
6969
}
7070
},
7171
"default": {
7272
"description": "unexpected error",
7373
"schema": {
74-
"$ref": "#/definitions/errorModel"
74+
"$ref": "#/definitions/ErrorModel"
7575
}
7676
}
7777
}
@@ -89,21 +89,21 @@
8989
"description": "Pet to add to the store",
9090
"required": true,
9191
"schema": {
92-
"$ref": "#/definitions/newPet"
92+
"$ref": "#/definitions/NewPet"
9393
}
9494
}
9595
],
9696
"responses": {
9797
"200": {
9898
"description": "pet response",
9999
"schema": {
100-
"$ref": "#/definitions/pet"
100+
"$ref": "#/definitions/Pet"
101101
}
102102
},
103103
"default": {
104104
"description": "unexpected error",
105105
"schema": {
106-
"$ref": "#/definitions/errorModel"
106+
"$ref": "#/definitions/ErrorModel"
107107
}
108108
}
109109
}
@@ -133,13 +133,13 @@
133133
"200": {
134134
"description": "pet response",
135135
"schema": {
136-
"$ref": "#/definitions/pet"
136+
"$ref": "#/definitions/Pet"
137137
}
138138
},
139139
"default": {
140140
"description": "unexpected error",
141141
"schema": {
142-
"$ref": "#/definitions/errorModel"
142+
"$ref": "#/definitions/ErrorModel"
143143
}
144144
}
145145
}
@@ -164,15 +164,15 @@
164164
"default": {
165165
"description": "unexpected error",
166166
"schema": {
167-
"$ref": "#/definitions/errorModel"
167+
"$ref": "#/definitions/ErrorModel"
168168
}
169169
}
170170
}
171171
}
172172
}
173173
},
174174
"definitions": {
175-
"pet": {
175+
"Pet": {
176176
"required": [
177177
"id",
178178
"name"
@@ -190,10 +190,10 @@
190190
}
191191
}
192192
},
193-
"newPet": {
193+
"NewPet": {
194194
"allOf": [
195195
{
196-
"$ref": "pet"
196+
"$ref": "#/definitions/Pet"
197197
},
198198
{
199199
"required": [
@@ -208,7 +208,7 @@
208208
}
209209
]
210210
},
211-
"errorModel": {
211+
"ErrorModel": {
212212
"required": [
213213
"code",
214214
"message"

examples/v2.0/json/petstore-minimal.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"version": "1.0.0",
55
"title": "Swagger Petstore",
66
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
7-
"termsOfService": "http://helloreverb.com/terms/",
7+
"termsOfService": "http://swagger.io/terms/",
88
"contact": {
9-
"name": "Wordnik API Team"
9+
"name": "Swagger API Team"
1010
},
1111
"license": {
1212
"name": "MIT"
1313
}
1414
},
15-
"host": "petstore.swagger.wordnik.com",
15+
"host": "petstore.swagger.io",
1616
"basePath": "/api",
1717
"schemes": [
1818
"http"
@@ -36,7 +36,7 @@
3636
"schema": {
3737
"type": "array",
3838
"items": {
39-
"$ref": "#/definitions/pet"
39+
"$ref": "#/definitions/Pet"
4040
}
4141
}
4242
}
@@ -45,7 +45,7 @@
4545
}
4646
},
4747
"definitions": {
48-
"pet": {
48+
"Pet": {
4949
"required": [
5050
"id",
5151
"name"

examples/v2.0/json/petstore-simple.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"version": "1.0.0",
55
"title": "Swagger Petstore",
66
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
7-
"termsOfService": "http://helloreverb.com/terms/",
7+
"termsOfService": "http://swagger.io/terms/",
88
"contact": {
9-
"name": "Wordnik API Team"
9+
"name": "Swagger API Team"
1010
},
1111
"license": {
1212
"name": "MIT"
1313
}
1414
},
15-
"host": "petstore.swagger.wordnik.com",
15+
"host": "petstore.swagger.io",
1616
"basePath": "/api",
1717
"schemes": [
1818
"http"
@@ -61,14 +61,14 @@
6161
"schema": {
6262
"type": "array",
6363
"items": {
64-
"$ref": "#/definitions/pet"
64+
"$ref": "#/definitions/Pet"
6565
}
6666
}
6767
},
6868
"default": {
6969
"description": "unexpected error",
7070
"schema": {
71-
"$ref": "#/definitions/errorModel"
71+
"$ref": "#/definitions/ErrorModel"
7272
}
7373
}
7474
}
@@ -86,21 +86,21 @@
8686
"description": "Pet to add to the store",
8787
"required": true,
8888
"schema": {
89-
"$ref": "#/definitions/petInput"
89+
"$ref": "#/definitions/PetInput"
9090
}
9191
}
9292
],
9393
"responses": {
9494
"200": {
9595
"description": "pet response",
9696
"schema": {
97-
"$ref": "#/definitions/pet"
97+
"$ref": "#/definitions/Pet"
9898
}
9999
},
100100
"default": {
101101
"description": "unexpected error",
102102
"schema": {
103-
"$ref": "#/definitions/errorModel"
103+
"$ref": "#/definitions/ErrorModel"
104104
}
105105
}
106106
}
@@ -130,13 +130,13 @@
130130
"200": {
131131
"description": "pet response",
132132
"schema": {
133-
"$ref": "#/definitions/pet"
133+
"$ref": "#/definitions/Pet"
134134
}
135135
},
136136
"default": {
137137
"description": "unexpected error",
138138
"schema": {
139-
"$ref": "#/definitions/errorModel"
139+
"$ref": "#/definitions/ErrorModel"
140140
}
141141
}
142142
}
@@ -161,15 +161,15 @@
161161
"default": {
162162
"description": "unexpected error",
163163
"schema": {
164-
"$ref": "#/definitions/errorModel"
164+
"$ref": "#/definitions/ErrorModel"
165165
}
166166
}
167167
}
168168
}
169169
}
170170
},
171171
"definitions": {
172-
"pet": {
172+
"Pet": {
173173
"required": [
174174
"id",
175175
"name"
@@ -187,10 +187,10 @@
187187
}
188188
}
189189
},
190-
"petInput": {
190+
"PetInput": {
191191
"allOf": [
192192
{
193-
"$ref": "pet"
193+
"$ref": "#/definitions/Pet"
194194
},
195195
{
196196
"required": [
@@ -205,7 +205,7 @@
205205
}
206206
]
207207
},
208-
"errorModel": {
208+
"ErrorModel": {
209209
"required": [
210210
"code",
211211
"message"

0 commit comments

Comments
 (0)