Comfy-Org / Comfy-Org/ComfyUI_frontend

Migrate registry-types from openapi-typescript to @hey-api/openapi-ts

Open
#10,674 2 comments 0 reactions 1 assignee Claimed by @dante01yoon View on GitHub
developer experience
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

Follow-up from #10668.

## Problem

`@comfyorg/registry-types` uses `openapi-typescript` which generates TS types only. `@comfyorg/ingest-types` uses `@hey-api/openapi-ts` which generates both TS types and Zod schemas.

This means types from the Registry API (e.g. `ReleaseNote`, subscription tiers, node packages) cannot be validated at runtime with Zod, while Ingest API types can. The two packages handle different APIs but there is no technical reason for the tooling difference — it exists because `registry-types` was created earlier (2024) before `@hey-api/openapi-ts` was adopted.

## Scope

- [ ] Replace `openapi-typescript` with `@hey-api/openapi-ts` in `packages/registry-types/`
- [ ] Configure Zod plugin to generate `zod.gen.ts` alongside `types.gen.ts`
- [ ] Update all 52 files importing from `@comfyorg/registry-types` if generated type shapes change
- [ ] Verify the auto-update workflow from `comfy-api` still works after migration
- [ ] Update `src/types/comfyRegistryTypes.ts` re-export if needed

## Why

Enables Zod `.parse()` runtime validation for test mocks using Registry API types (e.g. `ReleaseNote`, `NodeVersion`), consistent with how `ingest-types` and `apiSchema.ts` already work. Also unifies the codegen tooling across both packages.

Parent: #10656

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10674-Migrate-registry-types-from-openapi-typescript-to-hey-api-openapi-ts-3316d73d3650812eaa14fd254cdb31c7) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.