-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/hey-api/openapi-ts into fea…
…t/openapi-2.0.0-parser
- Loading branch information
Showing
53 changed files
with
829 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
'@hey-api/client-fetch': minor | ||
--- | ||
|
||
**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. | ||
|
||
```js | ||
import { client } from 'client/sdk.gen'; | ||
|
||
client.setConfig({ | ||
accessToken: () => '<my_token>', // [!code --] | ||
apiKey: () => '<my_token>', // [!code --] | ||
auth: (auth) => '<my_token>', // [!code ++] | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@hey-api/client-axios': minor | ||
'@hey-api/client-fetch': minor | ||
--- | ||
|
||
**BREAKING**: rename exported Security interface to Auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@hey-api/openapi-ts': minor | ||
--- | ||
|
||
**BREAKING**: please update `@hey-api/client-*` packages to the latest version | ||
|
||
feat: add support for basic http auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@hey-api/client-axios': minor | ||
--- | ||
|
||
**BREAKING**: remove support for passing auth to Axios instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
'@hey-api/client-axios': minor | ||
--- | ||
|
||
**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. | ||
|
||
```js | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.