Skip to content

Commit

Permalink
馃摑 Tweak default suggested configs for generating clients (#10736)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Nov 30, 2023
1 parent 6fb951b commit 99a2ec9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/en/docs/advanced/generate-clients.md
Expand Up @@ -87,7 +87,7 @@ It could look like this:
"description": "",
"main": "index.js",
"scripts": {
"generate-client": "openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios"
"generate-client": "openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios --useOptions --useUnionTypes"
},
"author": "",
"license": "",
Expand All @@ -106,7 +106,7 @@ After having that NPM `generate-client` script there, you can run it with:
$ npm run generate-client

frontend-app@1.0.0 generate-client /home/user/code/frontend-app
> openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios
> openapi --input http://localhost:8000/openapi.json --output ./src/client --client axios --useOptions --useUnionTypes
```

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

0 comments on commit 99a2ec9

Please sign in to comment.