api: Modify api.sh so it downloads image builder api spec

Use curl to download `api.yaml` from `osbuild/image-builder` in
`api.sh`.

Now we do not need to manually download `api.yaml` from `image-builder`
before running `npm run api`.
This commit is contained in:
lucasgarfield 2024-01-22 13:03:08 +01:00 committed by Lucas Garfield
parent 819863835b
commit 7982ec4981

3
api.sh
View file

@ -1,5 +1,8 @@
#!/bin/bash
# Download the most up-to-date imageBuilder.yaml file and overwrite the existing one
curl https://raw.githubusercontent.com/osbuild/image-builder/main/internal/v1/api.yaml -o ./api/schema/imageBuilder.yaml
# Run commands in the background using & operator
npx @rtk-query/codegen-openapi ./api/config/imageBuilder.ts &
npx @rtk-query/codegen-openapi ./api/config/rhsm.ts &