[BUG] [typescript-axios] common.ts is generated with syntax error
Created by: tjzeeman
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? Expected: correct syntax -
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When upgrading my project to v5 the typescript-axios part caused compile issues due to the common.ts being generated with
import { RequiredError,?RequestArgs } from "./base";
This caused a syntax error and the build to give up.
openapi-generator version
Version 5.0.0, 5.2.0 and 5.2.1
Initial inspection suggests the cause of the issue is still present on the current master branch.
OpenAPI declaration file content or url
Generation Details
config.generatorName = 'typescript-axios'
Steps to reproduce
run gradle build to generate typescript-axios client
Related issues/PRs
None found at this moment.
Suggest a fix
The common.moustache file contains a Unicode character at the exact spot where the syntax error occurs
import { RequiredError, RequestArgs } from "./base"
This character looks like a space in most editors, but is not. See this screenshot from IntelliJ where the character is represented with a boxed line around it:
replacing this character with an actual space character should fix this. PR is in the works.