apical-ts - Yet Another OpenAPI to Zod/TypeScript Generator #5280
gunzip
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
apical-ts, OpenAPI to Zod/TypeScript Generator
apical-ts is an opinionated TypeScript code generator that creates type-safe structures from OpenAPI specifications. I've built this to directly address common issues with existing tools by focusing on strictness and comprehensive runtime validation.
What it Generates
1. Strict Zod v4 Schemas
It generate Zod v4 schemas from your OpenAPI models. The goal is to provide complete runtime validation for your API structures.
2. Type-Safe API Client
A fully-typed REST API client is generated, ensuring that requests and responses align with the specification, catching most errors at build time.
3. Validating Server Wrappers
It generates server-side wrappers which users can integrate in any framework (Express, Hono, etc.) that automatically hook up the generated Zod schemas. These wrappers handle the validation of incoming request parameters (body, query, path) before they reach the main route handler.
A Note on Project Status
This project is actively developed and is currently in the process of stabilizing the developer experience (DX) and the core interfaces. While it is already functioning and generating decent code, the tool's interface is subject to change in its path towards a stable release. Welcome users who are comfortable with a project in development!
Check out the documentation and get started: https://gunzip.github.io/apical-ts/ or play with StackBlitz demo
Beta Was this translation helpful? Give feedback.
All reactions