From 3156b11062f7680757235497b8fbd1677d92a538 Mon Sep 17 00:00:00 2001 From: Andrew Tereshko Date: Wed, 4 May 2022 21:48:57 +0300 Subject: [PATCH] Fixed error when building from schema with complex model properties like 'some:property' --- packages/typescript-fetch-client/templates/modelGeneric.hbs | 2 +- packages/typescript-fetch-client2/templates/modelGeneric.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/typescript-fetch-client/templates/modelGeneric.hbs b/packages/typescript-fetch-client/templates/modelGeneric.hbs index 03f80c06..eb31b09b 100644 --- a/packages/typescript-fetch-client/templates/modelGeneric.hbs +++ b/packages/typescript-fetch-client/templates/modelGeneric.hbs @@ -12,7 +12,7 @@ export interface {{className name}} {{#if parents}}extends {{#each parents}}{{{n {{/if}} {{#each properties}} {{>frag/propertyDocumentation memberOf=../name}} - {{#if readOnly}}readonly {{/if}}{{serializedName}}{{#unless required}}?{{/unless}}: {{{nativeType.serializedType}}}; + {{#if readOnly}}readonly {{/if}}'{{serializedName}}'{{#unless required}}?{{/unless}}: {{{nativeType.serializedType}}}; {{/each}} } {{>modelNestedModels}} diff --git a/packages/typescript-fetch-client2/templates/modelGeneric.hbs b/packages/typescript-fetch-client2/templates/modelGeneric.hbs index 03f80c06..eb31b09b 100644 --- a/packages/typescript-fetch-client2/templates/modelGeneric.hbs +++ b/packages/typescript-fetch-client2/templates/modelGeneric.hbs @@ -12,7 +12,7 @@ export interface {{className name}} {{#if parents}}extends {{#each parents}}{{{n {{/if}} {{#each properties}} {{>frag/propertyDocumentation memberOf=../name}} - {{#if readOnly}}readonly {{/if}}{{serializedName}}{{#unless required}}?{{/unless}}: {{{nativeType.serializedType}}}; + {{#if readOnly}}readonly {{/if}}'{{serializedName}}'{{#unless required}}?{{/unless}}: {{{nativeType.serializedType}}}; {{/each}} } {{>modelNestedModels}}