-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used? 4.0.1#master
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
The code generated for accessToken is :
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? configuration.accessToken()
: configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
configuration.accessToken() is called without parameters
Type definition for accessToken is
accessToken?: string | ((name: string, scopes?: string[]) => string);
name is a mandatory parameter
Typescript outputs the following error semantic error TS2554 Expected 1-2 arguments, but got 0.
Type definition for accessToken should probably be:
accessToken?: string | ((name?: string, scopes?: string[]) => string);
or, if the parameters are never used:
accessToken?: string | (() => string);
- [Optional] Bounty to sponsor the fix (example)
Description
openapi-generator version
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix
Reactions are currently unavailable