Skip to content

Commit 82e3590

Browse files
Update AbstractCSharpCodegen.java (#16577)
Fixed a bug in postProcessAllModels, changing an anyOf to a oneOf.
1 parent 353507e commit 82e3590

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> objs)
527527
// GrandparentAnimal has a discriminator, but no oneOf nor anyOf
528528
// modules\openapi-generator\src\test\resources\3_0\csharp\petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
529529
model.setHasDiscriminatorWithNonEmptyMapping(
530-
((model.anyOf != null && model.anyOf.size() > 0) || (model.anyOf != null && model.oneOf.size() > 0)) &&
530+
((model.anyOf != null && model.anyOf.size() > 0) || (model.oneOf != null && model.oneOf.size() > 0)) &&
531531
model.discriminator != null &&
532532
model.discriminator.getMappedModels() != null &&
533533
model.discriminator.getMappedModels().size() > 0);

0 commit comments

Comments
 (0)