Skip to content

Commit 3b04dd8

Browse files
committed
chore: import diff fixtures from go-swagger/go-swagger with full history
2 parents 9d329d7 + f926c8e commit 3b04dd8

39 files changed

Lines changed: 5660 additions & 0 deletions

diff/fixtures/bugs/2962/new.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Swagger Fixture",
5+
"version": "1.0"
6+
},
7+
"paths": {
8+
"/a/{id}": {
9+
"post": {
10+
"parameters": [
11+
{
12+
"name": "",
13+
"in": "body",
14+
"schema": { "$ref": "#/definitions/A2" }
15+
}
16+
],
17+
"responses": {
18+
"200": {
19+
"description": "200 response",
20+
"schema": { "$ref": "#/definitions/A3" }
21+
}
22+
}
23+
}
24+
}
25+
},
26+
"definitions": {
27+
"A2": {
28+
"type": "object",
29+
"required": [ "name", "field4" ],
30+
"properties": {
31+
"name": { "type": "string" },
32+
"description": { "type": "string" },
33+
"field3": { "type": "string" },
34+
"field4": { "type": "string" }
35+
}
36+
},
37+
"A3": {
38+
"type": "object",
39+
"properties": {
40+
"id": { "type": "integer" },
41+
"name": { "type": "string" },
42+
"otherDeletedName":{"type":"string","deprecated":true},
43+
"description": { "type": "string" },
44+
"letters": {
45+
"type": "array",
46+
"items": { "type": "string" }
47+
},
48+
"attributes": {
49+
"type": "object",
50+
"additionalProperties": { "type": "string" }
51+
}
52+
}
53+
}
54+
}
55+
}

diff/fixtures/bugs/2962/old.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Swagger Fixture",
5+
"version": "1.0"
6+
},
7+
"paths": {
8+
"/a/{id}": {
9+
"post": {
10+
"parameters": [
11+
{
12+
"name": "",
13+
"in": "body",
14+
"schema": { "$ref": "#/definitions/A2" }
15+
}
16+
],
17+
"responses": {
18+
"200": {
19+
"description": "200 response",
20+
"schema": { "$ref": "#/definitions/A3" }
21+
}
22+
}
23+
}
24+
}
25+
},
26+
"definitions": {
27+
"A2": {
28+
"type": "object",
29+
"required": [ "name", "description" ],
30+
"properties": {
31+
"name": { "type": "string" },
32+
"description": { "type": "string" }
33+
}
34+
},
35+
"A3": {
36+
"type": "object",
37+
"properties": {
38+
"id": { "type": "integer" },
39+
"name": { "type": "string" },
40+
"otherDeletedName":{"type":"string","deprecated":true},
41+
"description": { "type": "string" },
42+
"letters": {
43+
"type": "array",
44+
"items": { "type": "string" }
45+
},
46+
"attributes": {
47+
"type": "object",
48+
"additionalProperties": { "type": "string" }
49+
}
50+
}
51+
}
52+
}
53+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
BREAKING CHANGES:
2+
=================
3+
/a/:get - Request - Query.personality<string> - Deleted possible enumeration(s) - saucy
4+
/a/:get -> 200 - Response - Body<array[A1]>.personality<string> - Added possible enumeration(s) - sane
5+
/a/{id}:get -> 200 - Response - Body<array[A1]>.personality<string> - Added possible enumeration(s) - sane
6+
/b/:get -> 200 - Response - Body<array[A1]>.personality<string> - Added possible enumeration(s) - sane
7+
compatibility test FAILED: 4 breaking changes detected

diff/fixtures/enum.diff.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
NON-BREAKING CHANGES:
2+
=====================
3+
/a/:get - Request - Query.personality<string> - Added possible enumeration(s) - extrovert
4+
/a/:get -> 200 - Response - Body<array[A1]>.personality<string> - Deleted possible enumeration(s) - crazy
5+
/a/{id}:get -> 200 - Response - Body<array[A1]>.personality<string> - Deleted possible enumeration(s) - crazy
6+
/b/:get -> 200 - Response - Body<array[A1]>.personality<string> - Deleted possible enumeration(s) - crazy
7+
8+
BREAKING CHANGES:
9+
=================
10+
/a/:get - Request - Query.personality<string> - Deleted possible enumeration(s) - saucy
11+
/a/:get -> 200 - Response - Body<array[A1]>.personality<string> - Added possible enumeration(s) - sane
12+
/a/{id}:get -> 200 - Response - Body<array[A1]>.personality<string> - Added possible enumeration(s) - sane
13+
/b/:get -> 200 - Response - Body<array[A1]>.personality<string> - Added possible enumeration(s) - sane
14+
compatibility test FAILED: 4 breaking changes detected

diff/fixtures/enum.v1.json

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Swagger Fixture",
5+
"version": "1.0"
6+
},
7+
"paths": {
8+
"/a/": {
9+
"get": {
10+
"parameters": [
11+
{
12+
"name": "limit",
13+
"in": "query",
14+
"required": false,
15+
"type": "integer"
16+
},
17+
{
18+
"name": "personality",
19+
"in": "query",
20+
"required": false,
21+
"type": "string",
22+
"enum":["crazy","empathic","saucy"]
23+
}
24+
],
25+
"responses": {
26+
"200": {
27+
"description": "200 response",
28+
"schema": {
29+
"type": "array",
30+
"items": { "$ref": "#/definitions/A1" }
31+
}
32+
}
33+
}
34+
},
35+
"post": {
36+
"parameters": [
37+
{
38+
"name": "",
39+
"in": "body",
40+
"schema": { "$ref": "#/definitions/A2" }
41+
}
42+
],
43+
"responses": {
44+
"200": {
45+
"description": "200 response",
46+
"schema": { "$ref": "#/definitions/A3" }
47+
}
48+
}
49+
}
50+
},
51+
"/a/{id}": {
52+
"get": {
53+
"parameters": [
54+
{
55+
"name": "flavour",
56+
"required": false,
57+
"in": "query",
58+
"type": "string"
59+
},
60+
{
61+
"name": "id",
62+
"in": "path",
63+
"type": "string"
64+
}
65+
],
66+
"responses": {
67+
"200": {
68+
"description": "200 response",
69+
"schema": {
70+
"type": "array",
71+
"items": { "$ref": "#/definitions/A1" }
72+
}
73+
}
74+
}
75+
},
76+
"post": {
77+
"parameters": [
78+
{
79+
"name": "",
80+
"in": "body",
81+
"schema": { "$ref": "#/definitions/A2" }
82+
}
83+
],
84+
"responses": {
85+
"200": {
86+
"description": "200 response",
87+
"schema": { "$ref": "#/definitions/A3" }
88+
}
89+
}
90+
}
91+
},
92+
"/b/": {
93+
"get": {
94+
"parameters": [
95+
{
96+
"name": "limit",
97+
"in": "query",
98+
"required": false,
99+
"type": "integer"
100+
}
101+
],
102+
"responses": {
103+
"200": {
104+
"description": "200 response",
105+
"schema": {
106+
"type": "array",
107+
"items": { "$ref": "#/definitions/A1" }
108+
}
109+
}
110+
}
111+
},
112+
"post": {
113+
"parameters": [
114+
{
115+
"name": "",
116+
"in": "body",
117+
"schema": { "$ref": "#/definitions/A2" }
118+
}
119+
],
120+
"responses": {
121+
"200": {
122+
"description": "200 response",
123+
"schema": { "$ref": "#/definitions/A3" }
124+
}
125+
}
126+
}
127+
}
128+
},
129+
"definitions": {
130+
"A1": {
131+
"type": "object",
132+
"properties": {
133+
"id": { "type": "integer" },
134+
"name": { "type": "string" },
135+
"personality":{
136+
"type": "string",
137+
"enum":["crazy","empathic","saucy"]
138+
}
139+
}
140+
},
141+
"A2": {
142+
"type": "object",
143+
"required": [ "name", "description" ],
144+
"properties": {
145+
"name": { "type": "string" },
146+
"description": { "type": "string" }
147+
}
148+
},
149+
"A3": {
150+
"type": "object",
151+
"properties": {
152+
"id": { "type": "integer" },
153+
"name": { "type": "string" },
154+
"description": { "type": "string" },
155+
"letters": {
156+
"type": "array",
157+
"items": { "type": "string" }
158+
},
159+
"attributes": {
160+
"type": "object",
161+
"additionalProperties": { "type": "string" }
162+
}
163+
}
164+
}
165+
}
166+
}

0 commit comments

Comments
 (0)