Unable to generate Dictionary property with Angular template
asiffermann opened this issue · comments
Adrien Siffermann commented
I have the following definition in my Swagger file:
"ClaimsSet": {
"type": "object",
"properties": {
"claims": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
With the .NET generator, it is properly mapped to a Dictionary<string, string[]>, but with the Angular one, the type is not resolved.
So the generated TypeScript ends with that (and cannot be compiled):
/*ClaimsSet*/
export interface ClaimsSet {
/**/
claims: ;
}
Is it related to generics' support?
Sandor commented
No just dictionary support missing from the template, something like this should do the trick : https://github.com/geeklearningio/gl-swagger-generator/blob/feature/fix-ts-dictionnary/templates/typescript/angular/1.5/_typeCore.hbs