github-actions
released this
06 Jan 10:01
·
36 commits
to main
since this release
Minor Changes
-
BREAKING: rename exported Security interface to Auth
-
BREAKING: remove support for passing auth to Axios instance
-
BREAKING: please update
@hey-api/openapi-ts
to the latest versionfeat: replace accessToken and apiKey functions with auth
Added
auth
optionClient package functions
accessToken
andapiKey
were replaced with a singleauth
function for fetching auth tokens. If your API supports multiple auth mechanisms, you can use theauth
argument to return the appropriate token.import { client } from 'client/sdk.gen'; client.setConfig({ accessToken: () => '<my_token>', // [!code --] apiKey: () => '<my_token>', // [!code --] auth: (auth) => '<my_token>', // [!code ++] });
Due to conflict with the Axios native
auth
option, we removed support for configuring Axios auth. Please let us know if you require this feature added back.