Regenerate clients from gateway 0.5.0 + fix npm type export (#19)#20
Open
bburda wants to merge 2 commits into
Open
Regenerate clients from gateway 0.5.0 + fix npm type export (#19)#20bburda wants to merge 2 commits into
bburda wants to merge 2 commits into
Conversation
Re-export spec/openapi.yaml and SPEC_VERSION from the 0.5.0 gateway. The
spec now reflects the typed-DTO response/request schemas and the new
endpoints added since 0.4.0 (e.g. GET /apps/{id}/belongs-to). README spec
reference updated to v0.5.0.
dist/*.d.ts import from ../generated/schema, but the npm "files" array listed only "dist", so the published package omitted generated/ and consumer types resolved to any. Add "generated" to files.
There was a problem hiding this comment.
Pull request overview
This PR refreshes the repository’s source OpenAPI specification to match ros2_medkit gateway v0.5.0, updates the tracked spec version, and fixes the TypeScript npm packaging issue from #19 by ensuring generated type artifacts are included in the published tarball.
Changes:
- Regenerated/updated
spec/openapi.yamlfor gateway v0.5.0 (new/updated schemas and endpoints). - Bumped
SPEC_VERSIONand updated the README’s spec-version reference to v0.5.0. - Fixed TypeScript npm type export packaging by adding
generated/to the npmfileswhitelist.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| spec/openapi.yaml | Updates the canonical OpenAPI 3.1 spec used to generate clients (gateway v0.5.0). |
| SPEC_VERSION | Bumps tracked spec version from 0.4.0 → 0.5.0. |
| README.md | Updates documentation to reference the new spec/gateway version. |
| clients/typescript/package.json | Ensures generated/ is included in the npm publish files list (fix for #19). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+14
to
16
| "files": ["dist", "generated"], | ||
| "scripts": { | ||
| "build": "tsc", |
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.
Summary
Regenerate the API clients against the 0.5.0 gateway and fix the published-types packaging bug.
spec/openapi.yaml+SPEC_VERSION(0.4.0 → 0.5.0) from a gateway built at 0.5.0. The committed spec was last exported at 0.4.0 and predated this cycle's gateway work, so it was missing endpoints and the typed-DTO schema overhaul. The new spec has 139 paths and reflects the typed request/response schemas plus new endpoints (e.g.GET /apps/{app_id}/belongs-to). Generated client code is gitignored and regenerated by CI from this spec.dist/*.d.tsimport from../generated/schema, but the npmfilesarray listed onlydist, so the published package omittedgenerated/and consumer types resolved toany. Addedgeneratedtofiles;npm pack --dry-runnow includesgenerated/schema.d.ts.Note: the client package versions (
0.1.1) are intentionally left unchanged here - this PR refreshes the spec and fixes the type export; aligning the package version (and the resulting npm/PyPI republish) is a deliberate follow-up tied to the coordinated 0.5.0 versioning decision.SPEC_VERSIONtracks the gateway version and is independent of the package version by design.Issue
Type
Testing
Both clients were regenerated from the new spec and fully exercised:
npm ci,npm run generate,npm run build,npm test(54 passed),npm run typecheck,npm run lint- all green.npm pack --dry-runconfirmsgenerated/is now in the tarball../scripts/generate.sh, thenpip install -e '.[dev]'+pytest(90 passed),ruff check(clean),ruff format --check(clean).Checklist