Skip to content

Commit 452e95b

Browse files
Add missing test for Sedan
1 parent e478171 commit 452e95b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ public void testEnumDiscriminatorDefaultValueIsNotString() throws IOException {
167167
"MiniVan", "CarType carType = CarType.MiniVan",
168168
"CargoVan", "CarType carType = CarType.CargoVan",
169169
"SUV", "CarType carType = CarType.SUV",
170-
"Truck", "CarType carType = CarType.Truck"
170+
"Truck", "CarType carType = CarType.Truck",
171+
"Sedan", "CarType carType = CarType.Sedan"
171172

172173
);
173174
for (Map.Entry<String, String> e : expectedContents.entrySet()) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2305,7 +2305,8 @@ public void testAllOfWithSinglePrimitiveTypeRef() {
23052305
"MiniVan",
23062306
"CargoVan",
23072307
"SUV",
2308-
"Truck");
2308+
"Truck",
2309+
"Sedan");
23092310
for (String entity : entities) {
23102311
File entityFile = files.get(entity + ".java");
23112312
assertNotNull(entityFile);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ components:
6868
# Car inheritance tree: Car -> Truck -> SUV
6969
# Car -> Van -> MiniVan
7070
# Car -> Van -> CargoVan
71+
# Car -> Sedan
7172
Car:
7273
type: object
7374
required:
@@ -101,6 +102,8 @@ components:
101102
type: object
102103
allOf:
103104
- $ref: '#/components/schemas/Car'
105+
required:
106+
- carType
104107
properties:
105108
carType:
106109
$ref: '#/components/schemas/CarType'

0 commit comments

Comments
 (0)