mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-05 07:01:01 +00:00
add schema mapping support in typescript client codegen (#12840)
This commit is contained in:
parent
4bbfa01ba8
commit
00db9255c0
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user