Skip to content

Commit 520e2f0

Browse files
Ahmad Moudanicasualjim
authored andcommitted
fixes ##2831, circular dependency issue
1 parent 4ce9103 commit 520e2f0

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

diff/fixtures/refcircular.diff.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
No changes identified

diff/fixtures/refcircular.v1.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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": "",
13+
"in": "body",
14+
"schema": { "$ref": "#/definitions/A1" }
15+
}
16+
],
17+
"responses": {
18+
"200": {
19+
"description": "200 response",
20+
"schema": {
21+
"type": "array",
22+
"items": { "$ref": "#/definitions/A1" }
23+
}
24+
}
25+
}
26+
}
27+
}
28+
},
29+
"definitions": {
30+
"A1": {
31+
"type": "object",
32+
"properties": {
33+
"id": { "type": "integer" },
34+
"name": { "type": "string" },
35+
"a1":{ "$ref": "#/definitions/A1" }
36+
}
37+
}
38+
}
39+
}

diff/fixtures/refcircular.v2.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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": "",
13+
"in": "body",
14+
"schema": { "$ref": "#/definitions/A1" }
15+
}
16+
],
17+
"responses": {
18+
"200": {
19+
"description": "200 response",
20+
"schema": {
21+
"type": "array",
22+
"items": { "$ref": "#/definitions/A1" }
23+
}
24+
}
25+
}
26+
}
27+
}
28+
},
29+
"definitions": {
30+
"A1": {
31+
"type": "object",
32+
"properties": {
33+
"id": { "type": "integer" },`
34+
"name": { "type": "string" },
35+
"a1":{ "$ref": "#/definitions/A1" }
36+
}
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)