Fix TypeScript Map type

This commit is contained in:
Mads Mætzke Tandrup 2015-07-25 22:02:06 +02:00
parent 3f9b2a9678
commit b0f6b49595
No known key found for this signature in database
GPG Key ID: 67056F406C84B14B

View File

@ -121,9 +121,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
} else if (p instanceof MapProperty) {
MapProperty mp = (MapProperty) p;
Property inner = mp.getAdditionalProperties();
return getSwaggerType(p) + "<String, " + getTypeDeclaration(inner)
+ ">";
return "{ [key: string]: "+ getTypeDeclaration(inner) + "; }";
}
return super.getTypeDeclaration(p);
}