Skip to content

Commit c287d5c

Browse files
author
Weffe
committed
chore: bump version of package to ~2.0.0
1 parent 0b6e89e commit c287d5c

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

examples/with-nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"dependencies": {
1010
"axios": "^0.18.0",
11-
"axios-api-versioning": "~1.1.0"
11+
"axios-api-versioning": "~2.0.0"
1212
},
1313
"devDependencies": {
1414
"chalk": "^2.4.2",

examples/with-react-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@types/react": "16.8.4",
99
"@types/react-dom": "16.8.2",
1010
"axios": "^0.18.0",
11-
"axios-api-versioning": "~1.1.0",
11+
"axios-api-versioning": "~2.0.0",
1212
"json-server": "^0.14.2",
1313
"react": "^16.8.3",
1414
"react-dom": "^16.8.3",

examples/with-react-typescript/src/api.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import axios from 'axios';
2-
import { withVersioning, VersioningStrategy } from 'axios-api-versioning'
2+
import { withVersioning, VersioningStrategy, IWithVersioningConfig } from 'axios-api-versioning'
33

44
const axiosInstance = axios.create({
55
baseURL: 'http://localhost:4000'
66
});
77

8-
const client = withVersioning(axiosInstance);
8+
const config: IWithVersioningConfig = {
9+
apiVersion: '1',
10+
versioningStrategy: VersioningStrategy.MediaType,
11+
}
12+
13+
const client = withVersioning(axiosInstance, config);
914

1015
/**
1116
* here we manually set the apiVersion & versioningStrategy on every request
@@ -14,7 +19,6 @@ const client = withVersioning(axiosInstance);
1419
* If you have an app where you don't need to mix api versions,
1520
* then set your active version inside the withVersioning()
1621
*/
17-
1822
export function getBooksByQueryString(apiVersion: string) {
1923
return client.get('books', {
2024
apiVersion,

0 commit comments

Comments
 (0)