forked from loafle/openapi-generator-original
RequestFile is defined in the [api-all.mustache template](ac4ead9e78/modules/openapi-generator/src/main/resources/typescript-node/api-all.mustache (L29)), and it gets used [as a special case](ac4ead9e78/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java (L92)) [in the model.mustache template](ac4ead9e78/modules/openapi-generator/src/main/resources/typescript-node/model.mustache (L21)). When this special case is triggered and `RequestFile` is used in a model file, Typescript complains that the type is not found. ``` TSError: Unable to compile TypeScript: path/to/model.ts:15:16 - error TS2304: Cannot find name 'RequestFile'. 15 'myFile'?: RequestFile; ~~~~~~~~~~~ ``` This solution is to import `RequestFile` by adding it to the model template. Here is an openapi schema that would trigger this use-case: ```yaml openapi: 3.0.0 components: schemas: IUploadMyFileBody: type: object properties: myFile: type: string format: binary ```