Browse Source

📝 Tweak default suggested configs for generating clients (#10736)

pull/9248/merge
Sebastián Ramírez 1 year ago
committed by GitHub
parent
commit
99a2ec981b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      docs/en/docs/advanced/generate-clients.md

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

@ -87,7 +87,7 @@ It could look like this:
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "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": "", "author": "",
"license": "", "license": "",
@ -106,7 +106,7 @@ After having that NPM `generate-client` script there, you can run it with:
$ npm run generate-client $ npm run generate-client
[email protected] generate-client /home/user/code/frontend-app [email protected] 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> </div>
@ -246,7 +246,7 @@ Now as the end result is in a file `openapi.json`, you would modify the `package
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "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": "", "author": "",
"license": "", "license": "",

Loading…
Cancel
Save