forked from loafle/openapi-generator-original
add schema mapping support in typescript client codegen (#12840)
This commit is contained in:
+2
-2
@@ -885,10 +885,10 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
Schema inner;
|
||||
if (ModelUtils.isArraySchema(p)) {
|
||||
inner = ((ArraySchema) p).getItems();
|
||||
return this.getSchemaType(p) + "<" + this.getTypeDeclaration(ModelUtils.unaliasSchema(this.openAPI, inner)) + ">";
|
||||
return this.getSchemaType(p) + "<" + this.getTypeDeclaration(ModelUtils.unaliasSchema(this.openAPI, inner, schemaMapping)) + ">";
|
||||
} else if (ModelUtils.isMapSchema(p)) {
|
||||
inner = (Schema) p.getAdditionalProperties();
|
||||
return "{ [key: string]: " + this.getTypeDeclaration(ModelUtils.unaliasSchema(this.openAPI, inner)) + "; }";
|
||||
return "{ [key: string]: " + this.getTypeDeclaration(ModelUtils.unaliasSchema(this.openAPI, inner, schemaMapping)) + "; }";
|
||||
} else if (ModelUtils.isFileSchema(p)) {
|
||||
return "HttpFile";
|
||||
} else if (ModelUtils.isBinarySchema(p)) {
|
||||
|
||||
Reference in New Issue
Block a user