chore(infra) - Add openapi-ts:local script for local API development#1025
Merged
Conversation
This adds a new npm script `openapi-ts:local` that allows developers to generate TypeScript client code from a local OpenAPI gateway instance. Changes: - Add openapi-ts.config.local.ts for local gateway configuration - Add scripts/cleanup-local-openapi.ts to remove /api/eor prefix from generated URLs - Add npm script: openapi-ts:local - Update openapi-ts.config.ts with clarifying comments about production vs local usage Usage: - Production: npm run openapi-ts (existing) - Local development: npm run openapi-ts:local (new) Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (312 total)
✅ Bundle size check passed |
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
Contributor
📊 Coverage Report⚪ Coverage unchanged
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d2fca6d. Configure here.
jordividaller
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Human Explanation
This script can help us any time we have to generate types / endpoints locally, this helps us to test BE branches faster
When generating types with this script, avoid merging it to the main branch, types / endpoints should be always generated from the openapi-ts script which generates from production
Summary
This PR extracts the
openapi-ts:localscript and its dependencies from PR #1009 into a standalone change that can be reviewed and merged independently.The new script allows developers to generate TypeScript client code from a local OpenAPI gateway instance, which is useful for testing new API endpoints before they're deployed to production.
Changes
npm run openapi-ts:local- Generates client code from local gatewayopenapi-ts.config.local.ts- Configuration for local gateway (localhost:4000)scripts/cleanup-local-openapi.ts- Post-processing script to remove/api/eorprefix from generated URLsopenapi-ts.config.ts- Added clarifying comments about production vs local usagepackage.json- Added the new scriptUsage
Production API (existing)
Local Development API (new)
The local script will:
http://localhost:4000/api/eor/openapi/api/eorprefix from generated URLs (since the local gateway includes it but production doesn't)Dependencies
This PR only includes the infrastructure for the script. No functional changes to the application code.
Related
Made with Cursor
Note
Low Risk
Low risk: adds a new local-only OpenAPI generation path and a simple post-processing script without changing runtime application behavior; main risk is incorrect URL rewriting in generated clients.
Overview
Adds a new
npm run openapi-ts:localflow to generatesrc/clientfrom a local OpenAPI spec (openapi-ts.config.local.tspointing athttp://localhost:4000/api/eor/openapi).After generation, a new script (
scripts/cleanup-local-openapi.ts) rewrites generatedurl: '/api/eor/...entries insdk.gen.ts/types.gen.tsto remove the/api/eorprefix, andopenapi-ts.config.tsnow documents when to use production vs local generation.Reviewed by Cursor Bugbot for commit d2fca6d. Bugbot is set up for automated code reviews on this repo. Configure here.