@@ -46,6 +46,7 @@ import nodeRequest from '../templates/core/node/request.hbs';
4646import nodeSendRequest from '../templates/core/node/sendRequest.hbs' ;
4747import templateCoreSettings from '../templates/core/OpenAPI.hbs' ;
4848import templateCoreRequest from '../templates/core/request.hbs' ;
49+ import omitReadonly from '../templates/core/utils/OmitReadonly.hbs' ;
4950import xhrGetHeaders from '../templates/core/xhr/getHeaders.hbs' ;
5051import xhrGetRequestBody from '../templates/core/xhr/getRequestBody.hbs' ;
5152import xhrGetResponseBody from '../templates/core/xhr/getResponseBody.hbs' ;
@@ -83,6 +84,7 @@ import partialTypeInterface from '../templates/partials/typeInterface.hbs';
8384import partialTypeIntersection from '../templates/partials/typeIntersection.hbs' ;
8485import partialTypeReference from '../templates/partials/typeReference.hbs' ;
8586import partialTypeUnion from '../templates/partials/typeUnion.hbs' ;
87+ import typeWithOmitReadOnly from '../templates/partials/typeWithOmitReadOnly.hbs' ;
8688import { registerHandlebarHelpers } from './registerHandlebarHelpers' ;
8789
8890export interface Templates {
@@ -102,6 +104,9 @@ export interface Templates {
102104 request : Handlebars . TemplateDelegate ;
103105 baseHttpRequest : Handlebars . TemplateDelegate ;
104106 httpRequest : Handlebars . TemplateDelegate ;
107+ utils : {
108+ omitReadonly : Handlebars . TemplateDelegate ;
109+ } ;
105110 } ;
106111}
107112
@@ -134,6 +139,9 @@ export const registerHandlebarTemplates = (root: {
134139 request : Handlebars . template ( templateCoreRequest ) ,
135140 baseHttpRequest : Handlebars . template ( templateCoreBaseHttpRequest ) ,
136141 httpRequest : Handlebars . template ( templateCoreHttpRequest ) ,
142+ utils : {
143+ omitReadonly : Handlebars . template ( omitReadonly ) ,
144+ } ,
137145 } ,
138146 } ;
139147
@@ -163,6 +171,7 @@ export const registerHandlebarTemplates = (root: {
163171 Handlebars . registerPartial ( 'typeInterface' , Handlebars . template ( partialTypeInterface ) ) ;
164172 Handlebars . registerPartial ( 'typeReference' , Handlebars . template ( partialTypeReference ) ) ;
165173 Handlebars . registerPartial ( 'typeUnion' , Handlebars . template ( partialTypeUnion ) ) ;
174+ Handlebars . registerPartial ( 'typeWithOmitReadOnly' , Handlebars . template ( typeWithOmitReadOnly ) ) ;
166175 Handlebars . registerPartial ( 'typeIntersection' , Handlebars . template ( partialTypeIntersection ) ) ;
167176 Handlebars . registerPartial ( 'base' , Handlebars . template ( partialBase ) ) ;
168177
0 commit comments