Bug Report Checklist
Description
I am running into issues in several languages with OAS that are using resource names that are causing conflicts in specific languages. For example, one of the teams is creating a resource called "System". When that generates using the "csharp-netcore" language target. It creates all kinds of problems because System is a reserved word in DotNet. But I don't see System on the reserved word list so I cannot map it to a different name via the command line reserved word mapping.
For Java, I just recently had a team using "OffsetDateTime", "LocalDate" and "LocalTime" as part of their component schemas. Again, this is causing issues when generating against the "java" project as it gets confused and thinks the instances of the class are part of the "java.time" namespace.
openapi-generator version
6.6.0
OpenAPI declaration file content or url
Java Issue:
https://gist.github.com/jwenger100/c6d6bbfaedd63fe9fce645b9d6869016
Csharp-netcore issue:
https://gist.github.com/jwenger100/a6d5238a939deeed43f53de360962adb
Generation Details
Java:
openapi-generator-cli generate -g java
CSharp-Netcore
openapi-generator-cli generate -g csharp-netcore --library=httpclient
Steps to reproduce
- Run the generator command against the OAS provided in the gist above.
- Try to compile the generated code, it will fail.
Related issues/PRs
Suggest a fix
#16276
Bug Report Checklist
Description
I am running into issues in several languages with OAS that are using resource names that are causing conflicts in specific languages. For example, one of the teams is creating a resource called "System". When that generates using the "csharp-netcore" language target. It creates all kinds of problems because System is a reserved word in DotNet. But I don't see System on the reserved word list so I cannot map it to a different name via the command line reserved word mapping.
For Java, I just recently had a team using "OffsetDateTime", "LocalDate" and "LocalTime" as part of their component schemas. Again, this is causing issues when generating against the "java" project as it gets confused and thinks the instances of the class are part of the "java.time" namespace.
openapi-generator version
6.6.0
OpenAPI declaration file content or url
Java Issue:
https://gist.github.com/jwenger100/c6d6bbfaedd63fe9fce645b9d6869016
Csharp-netcore issue:
https://gist.github.com/jwenger100/a6d5238a939deeed43f53de360962adb
Generation Details
Java:
openapi-generator-cli generate -g java
CSharp-Netcore
openapi-generator-cli generate -g csharp-netcore --library=httpclient
Steps to reproduce
Related issues/PRs
Suggest a fix
#16276