Skip to content

Commit d1994f8

Browse files
Adjusts oneOf_array test to ensure that it is generated as an interface instead of being simplified
1 parent 99f63e8 commit d1994f8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2272,7 +2272,7 @@ public static Object[][] sealedScenarios() {
22722272
"SchemaA.java", "public final class SchemaA extends RepresentationModel<SchemaA> implements PostRequest {",
22732273
"PostRequest.java", "public sealed interface PostRequest permits SchemaA {")},
22742274
{"oneOf_array.yaml", Map.of(
2275-
"MyExampleGet200Response.java", "public interface MyExampleGet200Response")},
2275+
"MyExampleGet200Response.java", "public sealed interface MyExampleGet200Response")},
22762276
{"oneOf_duplicateArray.yaml", Map.of(
22772277
"Example.java", "public interface Example {")},
22782278
{"oneOf_nonPrimitive.yaml", Map.of(

modules/openapi-generator/src/test/resources/3_0/oneOf_array.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ paths:
1515
- type: array
1616
items:
1717
"$ref": "#/components/schemas/OneOf1"
18+
- type: object
19+
"$ref": "#/components/schemas/OneOf1"
1820
components:
1921
schemas:
2022
OneOf1:

0 commit comments

Comments
 (0)