Open charlax opened 2 years ago
Manually adding the //@ts-ignore
didn't solve the issue for me.
I ended up changing the type of the URLParse
in the RequestContext
to URLParse<Record<string, string | undefined>>;
so that it looks like this
/**
* Represents an HTTP request context
*/
export class RequestContext {
private headers: { [key: string]: string } = {};
private body: RequestBody = undefined;
private url: URLParse<Record<string, string | undefined>>;
Fixed this by using the pinned version of @types/url-parse
as defined in the generated package.json. At time of writing, this is "@types/url-parse": "1.4.4"
.
Bug Report Checklist
Description
Contrary to v5.4.0, the generate
http/http.ts
does not include the@ts-ignore
comment and as such fail type checking:(tested with url-parse types 1.4.8. I get other errors with 1.4.4)
openapi-generator version
v6.0.0
OpenAPI declaration file content or url
N/A
Generation Details
N/A
Steps to reproduce
Related issues/PRs
Introduced in https://github.com/OpenAPITools/openapi-generator/pull/11465
Suggest a fix
Add back the
// @ts-ignore
?