Skip to content

Roadmap

The mission of this toolchain is to be a 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.

This page mirrors the ROADMAP.md in the repo. The five published packages are four generators (openapi-zod-ts, @codewithagents/openapi-server, @codewithagents/openapi-react-query, @codewithagents/openapi-msw) plus one runtime helper (@codewithagents/api-errors).

PackageVersionOne-liner
openapi-zod-tsv2.1.0Core generator: TypeScript models, native fetch client, and Zod schemas from an OpenAPI 3.1 spec. CLI: openapi-zod-ts.
@codewithagents/openapi-serverv2.0.0Framework-agnostic service interface plus an optional router. CLI: openapi-server.
@codewithagents/openapi-react-queryv3.12.1Typed React Query v5 hooks over the generated client.
@codewithagents/openapi-mswv0.2.0MSW v2 handlers with seeded Faker mock data. CLI: openapi-msw.
@codewithagents/api-errorsv1.2.0Maps backend API error responses to form-field errors. Runtime helper, not a codegen step.

Maps backend API error responses to form field errors. Framework-agnostic core with adapters for React Hook Form, Formik, TanStack Form, and vanilla JavaScript.

Supported parsers: RFC 7807 / RFC 9457 Problem Details, Spring Boot validation errors, violations / invalid-params shapes, JSON:API error objects, Laravel and DRF error formats, flat field/message objects, GraphQL error extensions, Zod flatten output, and Axios response wrappers.

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. Ships the openapi-zod-ts CLI.

Core features shipped:

  • models.ts: TypeScript interfaces for every schema in components.schemas
  • client.ts: one typed async function per API operation
  • client-config.ts: configureClient() and getConfig() for base URL and auth
  • index.ts: barrel re-export of all three files
  • Optional Zod integration via input_schema: bootstraps schemas.ts on first run, then validates requests and responses on every call
  • Optional server.ts via server_client: true: createServerClient() factory for SSR
  • Multi-spec projects array in config: drive N separate generations from one config file

@codewithagents/openapi-react-query (v3.12.1)

Section titled “@codewithagents/openapi-react-query (v3.12.1)”

A separate package layered on top of openapi-zod-ts. Reads the same openapi.json and the output of the generator, then produces React Query v5 hooks.

  • queryOptions factories for GET endpoints
  • useMutation hooks for write operations
  • useInfiniteQuery hooks for paginated endpoints
  • Imports from openapi-zod-ts’s client.ts output
  • Peer dependency: @tanstack/react-query

Server-side counterpart to openapi-zod-ts. Reads the same openapi.json and generates a framework-agnostic service interface plus an optional router selected by framework: "hono" | "express" | "fastify" | "none" (default "none", which emits only the service interface and lets you wire it to any framework yourself). Fastify is the framework the project ships its canonical full-stack app on. Ships the openapi-server CLI.

Peer dependencies: hono, express, or fastify depending on the chosen framework.

Generates MSW v2 HTTP handlers with seeded Faker mock data from an OpenAPI 3.1 spec. Depends on openapi-zod-ts. Produces a single handlers.ts file ready to drop into a Storybook or Vitest browser setup. Ships the openapi-msw CLI.

  • One http.<method>(path, resolver) handler per operation
  • Faker-seeded responses derived from response schemas
  • Peer dependencies: msw (^2) and @faker-js/faker (^9)

One spec drives four generators. The shared schemas.ts is the single source of validation truth across the wire.

openapi.json + schemas.ts
├── openapi-zod-ts → client validates responses with the user's Zod schemas
├── @codewithagents/openapi-server → server validates requests with the same Zod schemas
├── @codewithagents/openapi-react-query → React Query v5 hooks over the generated client
└── @codewithagents/openapi-msw → MSW v2 handlers with seeded Faker mock data

@codewithagents/api-errors then maps server validation failures back onto form fields in app code. The canonical end-to-end reference wiring all of this together is packages/petstore-fastify: Fastify plus createContext auth, a cross-field validation rule, and a React / react-query frontend with browser e2e that round-trips a cross-field error onto a form field. @codewithagents/petstore-hono is a retained legacy Hono variant.