swagger-codegen-generators
swagger-codegen-generators copied to clipboard
[Typescript] Set parent for additional properties to Record<string, Child>
This fixes #691
The gist of the issue is that currently, the typescript generators generate additional properties to have a parent of null<String, Child>. This is wrong in two dimensions.
- The parent type should not be
null. I choseRecordin this PR as a default. - The parameter of the key is in upper case. This is wrong in Typescript and has to be lower case. This actually comes hard-coded from the DefaultCodegenConfig class. I guess this is a bug here, but I did not dare touching it since it affects all languages.
Seems resonable to me. At the very least map=Record should be default. Workaround while waiting for this PR is adding --instantiation-types map=Record to the CLI. However, this still generates Record<String, instead of Record<string, .
@Lukas-Kullmann Any update on this PR? Why is it not merged?
Are there any updates on this? This fix would help me very much too