@@ -228,26 +228,28 @@ class CodeGenProcess {
228
228
return {
229
229
utils : {
230
230
Ts : this . config . Ts ,
231
- formatDescription : this . schemaParser . schemaFormatters . formatDescription ,
231
+ formatDescription : this . schemaParser . schemaFormatters . formatDescription . bing (
232
+ this . schemaParser . schemaFormatters ,
233
+ ) ,
232
234
internalCase : internalCase ,
233
235
classNameCase : pascalCase ,
234
236
pascalCase : pascalCase ,
235
- getInlineParseContent : this . schemaParser . getInlineParseContent ,
236
- getParseContent : this . schemaParser . getParseContent ,
237
- getComponentByRef : this . schemaComponentMap . get ,
238
- parseSchema : this . schemaParser . parseSchema ,
239
- checkAndAddNull : this . schemaParser . schemaUtils . safeAddNullToType ,
240
- safeAddNullToType : this . schemaParser . schemaUtils . safeAddNullToType ,
241
- isNeedToAddNull : this . schemaParser . schemaUtils . isNullMissingInType ,
242
- inlineExtraFormatters : this . schemaParser . schemaFormatters . inline ,
243
- formatters : this . schemaParser . schemaFormatters . base ,
244
- formatModelName : this . typeName . format ,
237
+ getInlineParseContent : this . schemaParser . getInlineParseContent . bind ( this . schemaParser ) ,
238
+ getParseContent : this . schemaParser . getParseContent . bind ( this . schemaParser ) ,
239
+ getComponentByRef : this . schemaComponentMap . get . bind ( this . schemaComponentMap ) ,
240
+ parseSchema : this . schemaParser . parseSchema . bind ( this . schemaParser ) ,
241
+ checkAndAddNull : this . schemaParser . schemaUtils . safeAddNullToType . bind ( this . schemaParser . schemaUtils ) ,
242
+ safeAddNullToType : this . schemaParser . schemaUtils . safeAddNullToType . bind ( this . schemaParser . schemaUtils ) ,
243
+ isNeedToAddNull : this . schemaParser . schemaUtils . isNullMissingInType . bind ( this . schemaParser . schemaUtils ) ,
244
+ inlineExtraFormatters : this . schemaParser . schemaFormatters . inline . bind ( this . schemaParser . schemaFormatters ) ,
245
+ formatters : this . schemaParser . schemaFormatters . base . bind ( this . schemaParser . schemaFormatters ) ,
246
+ formatModelName : this . typeName . format . bind ( this . typeName ) ,
245
247
fmtToJSDocLine : function fmtToJSDocLine ( line , { eol = true } ) {
246
248
return ` * ${ line } ${ eol ? "\n" : "" } ` ;
247
249
} ,
248
250
NameResolver : NameResolver ,
249
251
_,
250
- require : this . templates . requireFnFromTemplate ,
252
+ require : this . templates . requireFnFromTemplate . bind ( this . templates ) ,
251
253
} ,
252
254
config : this . config ,
253
255
} ;
0 commit comments