Roadmap
The mission of this toolchain is zero-footprint bridge between OpenAPI and Zod for both sides of the wire. Every package is a devDependency or a peer-dep-only tool. Nothing published here adds bytes to a production bundle that are not already there.
Now: shipped
Section titled “Now: shipped”@codewithagents/api-errors (v0.2.0)
Section titled “@codewithagents/api-errors (v0.2.0)”Maps backend API error responses to form field errors. Framework-agnostic core with a React Hook Form adapter.
Supported formats: RFC 7807 Problem Details, Spring Boot validation, flat field/message objects, and Axios response wrappers.
@codewithagents/openapi-gen (shipped)
Section titled “@codewithagents/openapi-gen (shipped)”A CLI devDependency that reads an OpenAPI 3.1 spec and an optional user-owned Zod schema, then generates self-contained TypeScript. No runtime package required. The generated client uses only native fetch.
Core features shipped:
models.ts: TypeScript interfaces for every schema incomponents.schemasclient.ts: one typedasync functionper API operationclient-config.ts:configureClient()andgetConfig()for base URL and authindex.ts: barrel re-export of all three files- Optional Zod integration via
input_schema: bootstrapsschemas.tson first run, then validates requests and responses on every call - Optional
server.tsviaserver_client: true:createServerClient()factory for SSR
Next: near-term
Section titled “Next: near-term”@codewithagents/openapi-react-query
Section titled “@codewithagents/openapi-react-query”A separate package layered on top of openapi-gen. Reads the same openapi.json and the output of the generator, then produces React Query v5 hooks.
queryOptionsfactories for GET endpointsuseMutationhooks for write operations- Imports from
openapi-gen’sclient.tsoutput - Peer dependency:
@tanstack/react-query
Full OpenAPI 3.0 normalization
Section titled “Full OpenAPI 3.0 normalization”OpenAPI 3.0.x is currently supported on a best-effort basis. One known gap: nullable: true (a 3.0 construct) is not yet normalized to its 3.1 equivalent (type: [..., "null"] semantics). Full normalization of the 3.0 nullable pattern is planned for a future release so that 3.0 specs are handled with the same fidelity as 3.1.
Later: planned
Section titled “Later: planned”@codewithagents/openapi-server
Section titled “@codewithagents/openapi-server”Server-side counterpart to openapi-gen. Reads the same openapi.json and generates typed Fastify route definitions using the same Zod schemas.
The full-stack story this enables:
openapi.json + schemas.ts ├── openapi-gen → client validates responses with user's Zod schemas └── openapi-gen-server → server validates requests with the same Zod schemasPeer dependencies: fastify and fastify-type-provider-zod.