Skip to content

Regenerate clients from gateway 0.5.0 + fix npm type export (#19)#20

Open
bburda wants to merge 2 commits into
mainfrom
chore/regenerate-spec-0.5.0
Open

Regenerate clients from gateway 0.5.0 + fix npm type export (#19)#20
bburda wants to merge 2 commits into
mainfrom
chore/regenerate-spec-0.5.0

Conversation

@bburda
Copy link
Copy Markdown
Contributor

@bburda bburda commented Jun 1, 2026

Summary

Regenerate the API clients against the 0.5.0 gateway and fix the published-types packaging bug.

  • Re-exported 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.
  • Fix [BUG] Published npm package missing generated/ types - paths resolves to any #19: 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. Added generated to files; npm pack --dry-run now includes generated/schema.d.ts.
  • Updated the README spec-version reference to v0.5.0.

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_VERSION tracks 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:

  • TypeScript: npm ci, npm run generate, npm run build, npm test (54 passed), npm run typecheck, npm run lint - all green. npm pack --dry-run confirms generated/ is now in the tarball.
  • Python: ./scripts/generate.sh, then pip install -e '.[dev]' + pytest (90 passed), ruff check (clean), ruff format --check (clean).

Checklist

  • Breaking changes are clearly described (none to the client API surface; the spec schemas tighten to match the gateway's typed DTOs)
  • Tests were added or updated if needed (regenerated clients pass the full existing TS + Python suites)
  • Docs were updated if behavior or public API changed (README spec version)

bburda added 2 commits June 1, 2026 18:09
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.
Copilot AI review requested due to automatic review settings June 1, 2026 16:10
Copy link
Copy Markdown

Copilot AI left a 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 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.yaml for gateway v0.5.0 (new/updated schemas and endpoints).
  • Bumped SPEC_VERSION and updated the README’s spec-version reference to v0.5.0.
  • Fixed TypeScript npm type export packaging by adding generated/ to the npm files whitelist.

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",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Published npm package missing generated/ types - paths resolves to any

2 participants