Merged
Conversation
Signed-off-by: Peter Jausovec <[email protected]>
timflannagan
approved these changes
Mar 2, 2026
Closed
christian-posta
pushed a commit
to christian-posta/agentregistry
that referenced
this pull request
Mar 9, 2026
Replace the manually maintained UI API client (`admin-api.ts`) with an auto-generated TypeScript client from the backend's OpenAPI spec. This eliminates an entire class of UI-backend mismatches. - Rewrote `cmd/tools/gen-openapi` to produce an OpenAPI spec directly from Huma route registrations - Added `@hey-api/openapi-ts` to auto-generate typed SDK functions + types from the spec - Migrated all 13 UI files from the old `adminApiClient` class to the generated SDK - Added `make gen-client` target and CI verification (`make verify` now catches stale generated files) - Removed the "Published" tab (publishing is implicit on creation) and renamed "Admin" to "Catalog" - Replaced tab navigation with clickable category cards (closes agentregistry-dev#157) whenever there's a change to the APIs in the backend, you do: ``` make gen-client # regenerates openapi.yaml + TypeScript client cd ui && npx tsc --noEmit # shows any UI code that needs updating ``` The CI will run `make verify` which will fail if the files are stale. ``` /kind feature /kind cleanup ``` ```release-note Auto-generate TypeScript API client from OpenAPI spec, replacing the manually maintained admin-api.ts. Run `make gen-client` after API changes. ``` Signed-off-by: Peter Jausovec <[email protected]>
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.
Description
Replace the manually maintained UI API client (
admin-api.ts) with an auto-generated TypeScript client from the backend's OpenAPI spec. This eliminates an entire class of UI-backend mismatches.cmd/tools/gen-openapito produce an OpenAPI spec directly from Huma route registrations@hey-api/openapi-tsto auto-generate typed SDK functions + types from the specadminApiClientclass to the generated SDKmake gen-clienttarget and CI verification (make verifynow catches stale generated files)whenever there's a change to the APIs in the backend, you do:
The CI will run
make verifywhich will fail if the files are stale.Change Type
Changelog