Skip to content

Commit

Permalink
feat(opapi): add api version in generated client (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
franklevasseur authored Sep 5, 2024
1 parent 2411332 commit 72c5668
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion opapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bpinternal/opapi",
"version": "0.10.22",
"version": "0.10.23",
"description": "",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
2 changes: 2 additions & 0 deletions opapi/src/generators/client-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ export const generateIndex = async (state: State<string, string, string>, indexF
}
indexCode += '\n'

indexCode += `export const apiVersion = '${state.metadata.version}'\n\n`

indexCode += [
'export type ClientProps = {',
' toAxiosRequest: typeof toAxiosRequest', // allows to override the toAxiosRequest function
Expand Down

0 comments on commit 72c5668

Please sign in to comment.