You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I use openapi-generator 4.3.1 to generate a C# client from a yaml file (OpenAPI V3) with additionalProperties inside. A Dictionary<Tkey, Tvalue> is created with an ojbect as Tvalue.
eg:
yml:
If the response of the endpoint has "tokens": [], I recevie an error: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Tokens' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
So I should modify Dictionary<string, DebugItemBeanTokens>
to Dictionary<string, List<string>>
Describe the solution you'd like
I want to have an option to control empty arrays [] in openapi-generator, for class created from additionalProperties.
Has this issues done in the version 5.0.0?
The text was updated successfully, but these errors were encountered:
I download the version 5.0.0-beta2 and generate the code, I always have the same error:
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Model.FilterValue' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
...
I compared Filter.cs and FilterValue.cs between 2 versions (4.3.1 and 5.0.0-beta2), they are the same.
Forthemore I can't find 5.0.0-beta3
I also download the lastest project and build it, when I run the command
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ...
There is nothing changed, I get the same c# objects.
Is your feature request related to a problem? Please describe.
I use openapi-generator 4.3.1 to generate a C# client from a yaml file (OpenAPI V3) with additionalProperties inside. A Dictionary<Tkey, Tvalue> is created with an ojbect as Tvalue.
eg:
yml:
C#:
Dictionary<string, DebugItemBeanTokens>
If the response of the endpoint has "tokens": [], I recevie an error:
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Tokens' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
So I should modify
Dictionary<string, DebugItemBeanTokens>
to
Dictionary<string, List<string>>
Describe the solution you'd like
I want to have an option to control empty arrays [] in openapi-generator, for class created from additionalProperties.
Has this issues done in the version 5.0.0?
The text was updated successfully, but these errors were encountered: