-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Description
I've tried to use allOf to check inherited classes case. But the problem is that it generates surplus model class ExtendedErrorModelAllOf.cs
among with ErrorModel.cs
ExtendedErrorModel.cs
I expect that ExtendedErrorModelAllOf.cs
should not be generated.
openapi-generator version
v4.0.3
OpenAPI declaration file content or url
Command line used for generation
java -jar D:/os/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i classInherit.yml -g aspnetcore -o d:\temp\ErrorMessage
java -jar D:/os/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i classInherit.yml -g csharp -o d:\temp\ErrorMessage
java -jar D:/os/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i classInherit.yml -g csharp-dotnet2 -o d:\temp\ErrorMessage
Steps to reproduce
clone openapi-generator
checkout v4.0.3
build mvnw package
get classInherit.yml
run commands
Related issues/PRs
Suggest a fix
I suppose the reason is in the AbstractCSharpCodegen since all three c# is affected.
probably it happens because of ExtendedErrorModel has -ref$
and -type
ExtendedErrorModel:
allOf:
- $ref: '#/definitions/ErrorModel'
- type: object