mtennoe / swagger-typescript-codegen

A Swagger Codegenerator tailored for typescript.
Apache License 2.0
140 stars 52 forks source link

fix: invalid types such as Dictionary<void> are generated #126

Closed tido64 closed 3 years ago

tido64 commented 3 years ago

The object type in C# outputs a Swagger definition as below:

"Example": {
  "type": "object",
  "additionalProperties": { }
}

additionalProperties is then passed to isVoidType() and returns true because all of the checked properties are undefined, and we end up with e.g. Dictionary<void> instead of Dictionary<{}>.

Microsoft Reviewers: Open in CodeFlow
mtennoe commented 3 years ago

Thanks for fixing! Merged and published as 3.2.2