Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f36b0e9

Browse files
author
Nils Lindemann
authored
Merge branch 'tiangolo:master' into review-en/docs/contributing.md
2 parents b7a9dd5 + 8cf2fa0 commit f36b0e9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/en/docs/advanced/generate-clients.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ It could look like this:
8787
"description": "",
8888
"main": "index.js",
8989
"scripts": {
90-
"generate-client": "openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios"
90+
"generate-client": "openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios --useOptions --useUnionTypes"
9191
},
9292
"author": "",
9393
"license": "",
@@ -106,7 +106,7 @@ After having that NPM `generate-client` script there, you can run it with:
106106
$ npm run generate-client
107107

108108
[email protected] generate-client /home/user/code/frontend-app
109-
> openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios
109+
> openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios --useOptions --useUnionTypes
110110
```
111111

112112
</div>
@@ -246,7 +246,7 @@ Now as the end result is in a file `openapi.json`, you would modify the `package
246246
"description": "",
247247
"main": "index.js",
248248
"scripts": {
249-
"generate-client": "openapi --input ./openapi.json --output ./src/client --client axios"
249+
"generate-client": "openapi --input ./openapi.json --output ./src/client --client axios --useOptions --useUnionTypes"
250250
},
251251
"author": "",
252252
"license": "",

docs/en/docs/release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ hide:
99

1010
* 🔧 Update sponsors, add Scalar. PR [#10728](https://github.com/tiangolo/fastapi/pull/10728) by [@tiangolo](https://github.com/tiangolo).
1111

12+
### Docs
13+
14+
* 📝 Tweak default suggested configs for generating clients. PR [#10736](https://github.com/tiangolo/fastapi/pull/10736) by [@tiangolo](https://github.com/tiangolo).
15+
1216
### Internal
1317

1418
* 🔧 Update sponsors, remove Fern. PR [#10729](https://github.com/tiangolo/fastapi/pull/10729) by [@tiangolo](https://github.com/tiangolo).

0 commit comments

Comments
 (0)