I'm using the OpenAPI Generator (typescript-angular, but I'm also having the same issue with all other typescript generators) to generate models from a OpenAPI specification that includes:
name:
type: object
additionalProperties:
type: string
In my typescript model, this generates a field name: { [key: string]: string; };
. I'd rather have name: Map<string, string
however, but even when enabling <supportsES6>true</supportsES6>
the generator does not generate a Map
.
Using the java generator without any further configuration creates a Map
as required, so I'm pretty confident something is up with the typescript-* generators.
What am I doing wrong - or is it just not supposed to work, even though the documentation explicitly lists the Map
type as supported?