Files
InvokeAI/invokeai/frontend/api/README.md
T
Josh Corbett 2a45334b6c ci(frontend): retire legacy gates and share contract tooling
Run UI quality checks on webv2 and generate contracts with an independent locked API package.

Retain legacy type imports and bundle packaging; update generation commands, tests and ownership docs.
2026-09-29 18:47:06 -06:00

886 B

Shared API contracts

openapi.json records the backend OpenAPI schema. schema.ts is generated by openapi-typescript with the binary-upload, metadata, and enum handling in scripts/typegen.js. Both are checked for drift in CI using this package, independently of the UI packages.

From the repository root with its Python environment activated:

make frontend-api-install
make frontend-openapi
make frontend-typegen
pnpm -C invokeai/frontend/api test

Legacy webv1 keeps its existing services/api/schema import path through a type-only re-export. Webv2 maps backend wire contracts through its owning platform/features adapters. The API package does not add a frontend runtime dependency.

The generator is pinned to its TypeScript 5 peer and existing formatter versions; the active frontend remains on TypeScript 7. See AGENTS.md for validation and ownership rules.