-
Notifications
You must be signed in to change notification settings - Fork 2.3k
use npx in just generate-openapi #5664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies the generate-openapi Justfile target by using npx openapi-ts directly instead of calling the npm run generate-api script, eliminating the need to install npm dependencies in release workflows.
- Replaces
npm run generate-apiwithnpx openapi-tsin thegenerate-openapitarget
| cargo run -p goose-server --bin generate_schema | ||
| @echo "Generating frontend API..." | ||
| cd ui/desktop && npm run generate-api | ||
| cd ui/desktop && npx openapi-ts |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The openapi-ts command reads configuration from openapi-ts.config.ts which is in the ui/desktop directory. However, the CI workflow at .github/workflows/ci.yml:95 runs npm ci to install dependencies before calling just check-openapi-schema. This change breaks the workflow because npx will need to download @hey-api/openapi-ts on every run instead of using the installed version. Either keep using npm run generate-api (which requires npm ci first), or remove the npm ci step from the CI workflow if you want to rely on npx auto-downloading.
| cd ui/desktop && npx openapi-ts | |
| cd ui/desktop && npm run generate-api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this is obviously wrong because CI passed.
But also, npx will run from local node_modules first: https://docs.npmjs.com/cli/v7/commands/npx
Signed-off-by: Blair Allan <[email protected]>
rather than install all the tools in the release workflows