What problem does it solve?
Keeps OpenAPI-generated TypeScript types, client methods, data layers, network handlers, and test factories in sync across a frontend monorepo to prevent runtime type mismatches and failing tests after schema changes.
Core Features & Use Cases
- Type regeneration: Guidance for regenerating TypeScript types from the OpenAPI specification and identifying added, modified, or removed types.
- Client and data-layer updates: Steps to update canary-client method signatures and propagate changes into buyers and sellers data layers.
- Test and mocks alignment: Instructions to update network handlers and test factories so mocked responses and factories match new types.
- Validation: Commands to run type checking, linting, formatting, and unused-export checks to validate changes.
- Use Case: When an API endpoint adds a field, use this workflow to regenerate types, update the client method and data-layer usage, adjust mock handlers and factories, and run validations to ensure the codebase stays consistent.
Quick Start
Run the canary types generator, inspect the generated diff for new or changed types, update the canary client and affected data layers and tests accordingly, then run the monorepo type-check and lint validation.