Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 06 Jan 10:01
· 36 commits to main since this release
ec0080d

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 version

    feat: replace accessToken and apiKey functions with auth

    Added auth option

    Client package functions accessToken and apiKey were replaced with a single auth function for fetching auth tokens. If your API supports multiple auth mechanisms, you can use the auth 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.