Skip to content

Commit b2f164d

Browse files
committed
feat: add test-array endpoint and TestArrayResponse schema to oneOf.yaml
1 parent 7a3ea28 commit b2f164d

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

  • modules/openapi-generator/src/test/resources/3_0/typescript-fetch

modules/openapi-generator/src/test/resources/3_0/typescript-fetch/oneOf.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,34 @@ paths:
1515
application/json:
1616
schema:
1717
$ref: '#/components/schemas/TestResponse'
18+
/test-array:
19+
get:
20+
operationId: testArray
21+
responses:
22+
200:
23+
description: OK
24+
content:
25+
application/json:
26+
schema:
27+
$ref: '#/components/schemas/TestArrayResponse'
1828
components:
1929
schemas:
30+
TestArrayResponse:
31+
oneOf:
32+
- type: array
33+
items:
34+
$ref: "#/components/schemas/TestA"
35+
- type: array
36+
items:
37+
$ref: "#/components/schemas/TestB"
38+
- type: array
39+
items:
40+
type: string
2041
TestResponse:
2142
oneOf:
2243
- $ref: "#/components/schemas/TestA"
2344
- $ref: "#/components/schemas/TestB"
45+
- type: string
2446
TestA:
2547
type: object
2648
properties:
@@ -34,4 +56,4 @@ components:
3456
bar:
3557
type: string
3658
required:
37-
- bar
59+
- bar

0 commit comments

Comments
 (0)