API: Update readme and scripts

This commit updates the readme to reflect the use of
`@rtk-query/codegen` for generating API slice definitions and adds a new
script, `api.sh`, that is used to generate the API slices when the user
runs `npm run api`.
This commit is contained in:
lucasgarfield 2023-07-27 14:31:53 +02:00 committed by Lucas Garfield
parent 702b667dc5
commit 2776af4d6c
3 changed files with 37 additions and 12 deletions

View file

@ -112,7 +112,7 @@
"test": "TZ=UTC jest --verbose --no-cache",
"test:single": "jest --verbose -w 1",
"build": "webpack --config config/prod.webpack.config.js",
"api": "npx @rtk-query/codegen-openapi ./api/config/image-builder.ts & npx @rtk-query/codegen-openapi ./api/config/rhsm.ts & npx @rtk-query/codegen-openapi ./api/config/contentSources.ts & npx @rtk-query/codegen-openapi ./api/config/provisioning.ts",
"api": "bash api.sh",
"verify": "npm-run-all build lint test"
},
"insights": {