Open SartriX opened 3 years ago
There are configs where you could set both array types to concrete ones
I see something got dropped in the post:
Interface<Interface> = Concrete<Concrete>
does not compile. It would need to be Interface<Interface> = Concrete<Interface>
This should not be depending on any setting. I do like to keep the interfaces. Also: Which commandline setting would that be to get the full concrete behaviour? I'm using it from Visual Studio OpenApi integration.
Ran into this issue, too. Nested types results in the following uncompilable code:
public System.Collections.Generic.IDictionary<string, System.Collections.Generic.ICollection<CustomItem>> CustomData { get; set; }
= new System.Collections.Generic.Dictionary<string, System.Collections.ObjectModel.Collection<CustomItem>>();
For reference, the workaround mentioned above to replace the interfaces with concrete types can be done by adding the following in your csproj
(if using OpenApiReference
):
<Options>/ArrayType:System.Collections.ObjectModel.Collection</Options>
using Nswag.ApiDescriptionClient 13.10.1 on .Net Core 5.0.2 I'm having several issues generating a client from the public openApi: https://bag.basisregistraties.overheid.nl/api/v1 One issue is: Within it are several polygon objects which contain nested arrays, and these nested arrays are causing compile errors.
This is one of the schema objects defined in the yml spec:
resulting in:
Interface = Concrete does not compile. It would need to be Interface = Concrete
The correct generation would be: