openapi-typescript-codegen icon indicating copy to clipboard operation
openapi-typescript-codegen copied to clipboard

Bearer should be configure.

Open zhanghengxin opened this issue 2 years ago • 0 comments

Describe the solution you'd like A clear and concise description of what you want to happen. Ideally with a small example of the proposed changes.

The default method of adding Bearer without explicit configuration is really confusing. Unless there is a valid reason, I will submit a pull request to add a configuration option.

This is anti-human design.

if (isStringWithValue(token)) {
      headers["Authorization"] = `Bearer ${token}`;
    }

zhanghengxin avatar Nov 28 '23 10:11 zhanghengxin