Skip to content

Commit c15206b

Browse files
committed
https://github.com/OpenAPITools/openapi-generator/issues/16104
1 parent cc836ca commit c15206b

2 files changed

Lines changed: 89 additions & 0 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"components": {
3+
"schemas": {
4+
"Example": {
5+
"discriminator": {
6+
"mapping": {
7+
"generic": "ExampleGeneric",
8+
"images": "ExampleImages"
9+
},
10+
"propertyName": "tag"
11+
},
12+
"oneOf": [
13+
{
14+
"$ref": "#/components/schemas/ExampleGeneric"
15+
},
16+
{
17+
"$ref": "#/components/schemas/ExampleImages"
18+
}
19+
]
20+
},
21+
"ExampleGeneric": {
22+
"properties": {
23+
"content": {
24+
"type": "string"
25+
},
26+
"tag": {
27+
"enum": [
28+
"generic"
29+
],
30+
"type": "string"
31+
}
32+
},
33+
"required": [
34+
"content",
35+
"tag"
36+
],
37+
"type": "object"
38+
},
39+
"ExampleImages": {
40+
"properties": {
41+
"images": {
42+
"items": {
43+
"type": "string"
44+
},
45+
"type": "array"
46+
},
47+
"tag": {
48+
"enum": [
49+
"images"
50+
],
51+
"type": "string"
52+
}
53+
},
54+
"required": [
55+
"images",
56+
"tag"
57+
],
58+
"type": "object"
59+
}
60+
}
61+
},
62+
"info": {
63+
"title": "Bug 16104",
64+
"version": ""
65+
},
66+
"openapi": "3.0.0",
67+
"paths": {
68+
"/example": {
69+
"get": {
70+
"responses": {
71+
"200": {
72+
"content": {
73+
"application/json;charset=utf-8": {
74+
"schema": {
75+
"items": {
76+
"$ref": "#/components/schemas/Example"
77+
},
78+
"type": "array"
79+
}
80+
}
81+
},
82+
"description": ""
83+
}
84+
}
85+
}
86+
}
87+
}
88+
}

cli/src/TestGenScript.elm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ run =
127127
|> OpenApi.Config.withInput cookieAuth
128128
|> OpenApi.Config.withInput telegramBot
129129
|> OpenApi.Config.withInput (bug 10398)
130+
|> OpenApi.Config.withInput (bug 16104)
130131
|> OpenApi.Config.withInput (bug 22119)
131132
|> OpenApi.Config.withInput (bug 22530)
132133
in

0 commit comments

Comments
 (0)