OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When oneOf is used along with a specific set of codegen options, we see this problem. In the following example, SomethingMydata.cs has two constructors: SomethingMydata() and SomethingMydata(string actualInstance). When the latter is used, it's impossible to know if the input is "Alpha" or "HelloWorld". If application code wants to initialize Something with "Alpha" there's no proper way to do this. Note the "Alpha" can contain two properties: "abc" and "def". Thus, Alpha can't be reduced to a single string.
👋 Any update on the above oneOf issue so far? Since csharp-netcore is merged with csharp. Do we have any update with -g csharp and --library httpclient ?
Bug Report Checklist
Description
When oneOf is used along with a specific set of codegen options, we see this problem. In the following example, SomethingMydata.cs has two constructors:
SomethingMydata()
andSomethingMydata(string actualInstance)
. When the latter is used, it's impossible to know if the input is "Alpha" or "HelloWorld". If application code wants to initialize Something with "Alpha" there's no proper way to do this. Note the "Alpha" can contain two properties: "abc" and "def". Thus, Alpha can't be reduced to a single string.openapi-generator version
openapi-generator-cli-6.5.0-20230329.141901-70.jar from https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.5.0-SNAPSHOT/
Did not test with 6.5.0 which has just been released. However, I expect the same problem.
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
As above
Related issues/PRs
Suggest a fix
No idea at the moment.