HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
asteasolutions
zod-to-openapi
TypeScript2023–2023
asteasolutions / zod-to-openapi

zod-to-openapi

A library that generates OpenAPI (Swagger) docs from Zod schemas

2Distinct people
3Mentions
0Explicit recommenders
1.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A library that generates OpenAPI (Swagger) docs from Zod schemas

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by day3 dated mentions

Observed mentions: 2023-10-10 17:37:39 UTC to 2023-10-26 11:30:58 UTC.

0122023-10-10 00:00:00 UTC to 2023-10-11 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsOct 102023-10-11 00:00:00 UTC to 2023-10-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-12 00:00:00 UTC to 2023-10-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-13 00:00:00 UTC to 2023-10-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-14 00:00:00 UTC to 2023-10-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-15 00:00:00 UTC to 2023-10-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-16 00:00:00 UTC to 2023-10-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-17 00:00:00 UTC to 2023-10-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-18 00:00:00 UTC to 2023-10-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsOct 182023-10-19 00:00:00 UTC to 2023-10-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-20 00:00:00 UTC to 2023-10-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-21 00:00:00 UTC to 2023-10-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-22 00:00:00 UTC to 2023-10-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-23 00:00:00 UTC to 2023-10-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-24 00:00:00 UTC to 2023-10-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-25 00:00:00 UTC to 2023-10-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-26 00:00:00 UTC to 2023-10-27 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsOct 26

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Oct 102023-10-10 00:00:00 UTC2023-10-11 00:00:00 UTC101
Oct 112023-10-11 00:00:00 UTC2023-10-12 00:00:00 UTC000
Oct 122023-10-12 00:00:00 UTC2023-10-13 00:00:00 UTC000
Oct 132023-10-13 00:00:00 UTC2023-10-14 00:00:00 UTC000
Oct 142023-10-14 00:00:00 UTC2023-10-15 00:00:00 UTC000
Oct 152023-10-15 00:00:00 UTC2023-10-16 00:00:00 UTC000
Oct 162023-10-16 00:00:00 UTC2023-10-17 00:00:00 UTC000
Oct 172023-10-17 00:00:00 UTC2023-10-18 00:00:00 UTC000
Oct 182023-10-18 00:00:00 UTC2023-10-19 00:00:00 UTC000
Oct 192023-10-19 00:00:00 UTC2023-10-20 00:00:00 UTC000
Oct 202023-10-20 00:00:00 UTC2023-10-21 00:00:00 UTC000
Oct 212023-10-21 00:00:00 UTC2023-10-22 00:00:00 UTC000
Oct 222023-10-22 00:00:00 UTC2023-10-23 00:00:00 UTC000
Oct 232023-10-23 00:00:00 UTC2023-10-24 00:00:00 UTC000
Oct 242023-10-24 00:00:00 UTC2023-10-25 00:00:00 UTC000
Oct 252023-10-25 00:00:00 UTC2023-10-26 00:00:00 UTC000
Oct 262023-10-26 00:00:00 UTC2023-10-27 00:00:00 UTC211

What Hacker News says

3 sources
Strong disagree. The barrier you presume is that OpenAPI specs are hard to write. Raw oAPI in yaml is indeed a pain, but there are good DSL's out there. I personally love Zod->OpenAPI, via https://ts-rest.com which uses https://www.npmjs.com/package/@anatine/zod-openapi. https://github.com/asteasolutions/zod-to-openapi is another alternative for Zod. > The big bonus of the human documentation approaches today is that time is somewhat combined with building the client. This is wild to me; human documentation is absurdly error-prone and it's almost always and immediately out of date. (Zod or other DSL) -> OpenAPI -> generated docs (and types! and clients! and mocks!) are always going to be better; always accurate, and faster. The upfront cost is slightly higher, but the ROI is _significant_. OpenAPI specs lend themselves to excellent docs,
Read the rest
ala Mintify or Docusaurus. Even interactive ones, like Swagger UI. The vast majority of API browsers & tooling understands OAPI, so why re-create (an often incomplete) version of the truth when using those tools? > Whatever is overall fastest and gets me on to the problems I'm really trying to solve. You may start (slightly) faster, but you'll incur significant cost when you move past the "trivial implementation" stage. For instance: - Do you do request & response validation on the server? That'll often need duplication on the client (e.g, error messages, and once out of sync, client-side validation mismatches server-side response) - Typescript on client & server? Then you're already doing the manual work (often more than once) that oAPI->types would get you for free. - Implementing client-side XHR calls manually, and getting typing right, is a pretty significant undertaking. Multiply that by the number of client-side stacks the API will be consumed by. Or, just generate them via OAPI (or real-time infer via something like ts-rest) - TS on client, but another BE stack? OpenAPI, when used right, ensures the "contract" is 1:1. When BE changes, client needs changing -- or it breaks. You want this safety. - Manually mocking API responses is wasteful; write good oAPI specs and auto-generate mocks (e.g, MSW). - Do you test the real API implementation? OpenAPI specs can help you do that automatically. At this stage of my career, I would turn down a job offer from a company/team that wasn't willing to use OpenAPI or equivalent single-source-of-truth (*unless I'm in a truly desperate situation)
In Show HN: REST Alternative to GraphQL and tRPC

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.