Description
The new initOverrides? optional parameter added in 5.2.1 is not working for us at least
openapi-generator version
5.2.1
Script that we use is simply:
npx @openapitools/openapi-generator-cli generate -i swagger.json -g typescript-fetch -o .\src\api
All of the generated Raw methods have this:
const response = await this.request({
...
}, initOverrides);
but the actual request looks like this:
protected async request(context: RequestOpts): Promise<Response> {
const { url, init } = this.createFetchParams(context);
const response = await this.fetchApi(url, init);
if (response.status >= 200 && response.status < 300) {
return response;
}
throw response;
}
and the interface like this:
export interface RequestOpts {
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
}
So I don't know where initOverrides should fit in there exactly?
Related issues/PRs
I guess this is where it was added?
#10050
Description
The new initOverrides? optional parameter added in 5.2.1 is not working for us at least
openapi-generator version
5.2.1
Script that we use is simply:
All of the generated Raw methods have this:
but the actual request looks like this:
and the interface like this:
So I don't know where initOverrides should fit in there exactly?
Related issues/PRs
I guess this is where it was added?
#10050