Skip to content

Register IconTheme in OpenAPI schema after rmcp 1.5.0 upgrade#8621

Merged
jh-block merged 2 commits into
mainfrom
jhugo/openapi-fix
Apr 17, 2026
Merged

Register IconTheme in OpenAPI schema after rmcp 1.5.0 upgrade#8621
jh-block merged 2 commits into
mainfrom
jhugo/openapi-fix

Conversation

@jh-block
Copy link
Copy Markdown
Collaborator

Category: fix
User Impact: CI and local builds no longer fail when generating the OpenAPI schema and TypeScript API types.

Problem: The rmcp 1.5.0 upgrade (merged in #8618) added an IconTheme enum field to the Icon struct, but IconTheme was never registered in the OpenAPI schema definitions. This caused openapi-ts code generation to fail with Reference not found: #/components/schemas/IconTheme, breaking just check-openapi-schema in CI and locally.

Solution: Import IconTheme, derive its utoipa schema, and register it in the OpenAPI schema list alongside the existing Icon schema. Regenerate openapi.json and the TypeScript API types.

File changes

crates/goose-server/src/openapi.rs
Import IconTheme from rmcp, add derive_utoipa!(IconTheme as IconThemeSchema), and register IconThemeSchema in the #[openapi(schemas(...))] attribute so the generated OpenAPI spec includes the missing type.

ui/desktop/openapi.json
Regenerated schema now includes the IconTheme enum definition and the theme field on Icon.

ui/desktop/src/api/types.gen.ts
Regenerated TypeScript types now include the IconTheme type and the theme property on the Icon interface.

ui/desktop/src/api/index.ts
Regenerated barrel export updated to include IconTheme.

How to verify

  1. Run just check-openapi-schema — it should pass with "✅ OpenAPI schema is up-to-date".
  2. Run just generate-openapi — it should complete without errors.

The rmcp 1.5.0 upgrade added an IconTheme enum to the Icon struct,
but the type was not registered in the OpenAPI schema definitions.
This caused openapi-ts code generation to fail with:
  Reference not found: #/components/schemas/IconTheme

Add IconTheme import, derive its utoipa schema, and register it
alongside the existing Icon schema. Regenerate openapi.json and
TypeScript API types.

Signed-off-by: jh-block <jhugo@block.xyz>
@jh-block jh-block requested a review from lifeizhou-ap April 17, 2026 11:59
@jh-block jh-block enabled auto-merge April 17, 2026 12:00
Signed-off-by: jh-block <jhugo@block.xyz>
@jh-block jh-block added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit d52cde3 Apr 17, 2026
21 checks passed
@jh-block jh-block deleted the jhugo/openapi-fix branch April 17, 2026 12:29
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.

2 participants