Open r-k-b opened 5 years ago
You'd need to provide a modified JsonSchemaGenerator (in NSwag v13 an own implementation of OpenApiSchemaGenerator) with a special implementation of GenerateDictionary:
I'll make the GenerateDictionary method protected virtual...
This will be in NSwag v13 (see preview packages) - but first we need to update the previews with the new NJS version.
For a C# type like
IDictionary<int, string>
, NSwag CLI produces the TypeScript type:However, the serializer we're using produces an array of objects, with the type
(aka
DataContractJsonSerializer
's "nonsensical" dictionary serialization)Is it feasible to have NSwag CLI output types like the latter?
Related?
435