Skip to content

Commit 74c65a2

Browse files
committed
Address cubic-dev-ai comment
1 parent e5bc4c9 commit 74c65a2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void testCodeGenWithOneOfDiscriminator31() throws IOException {
185185
for (CodegenProperty var : fruitModel.vars) {
186186
Assert.assertNotNull(var.name, "var name should not be null");
187187
Assert.assertNotNull(var.dataType, "var dataType should not be null");
188-
Assert.assertTrue(var.isModel, "var should be a model type");
188+
Assert.assertTrue(var.isModel, "var " + var.name + " should be a model type (isModel=" + var.isModel + ")");
189189
Assert.assertFalse(var.isContainer, "var should not be a container (it references a model)");
190190

191191
// Check expected properties based on discriminator title
@@ -195,6 +195,8 @@ public void testCodeGenWithOneOfDiscriminator31() throws IOException {
195195
Assert.assertEquals(var.dataType, "FloatMap", "banana_map should reference FloatMap");
196196
} else if (var.name.equals("orange_choice")) {
197197
Assert.assertEquals(var.dataType, "Orange", "orange_choice should reference Orange");
198+
} else {
199+
Assert.fail("Unexpected var name: " + var.name + ". Expected one of: apple_list, banana_map, orange_choice");
198200
}
199201
}
200202

0 commit comments

Comments
 (0)