zod-to-openapi

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

Zod-to-openapi Alternatives

Similar projects and alternatives to zod-to-openapi

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better zod-to-openapi alternative or higher similarity.

zod-to-openapi reviews and mentions

Posts with mentions or reviews of zod-to-openapi. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-25.
  • A library that generates OpenAPI (Swagger) docs from Zod schemas
    1 project | news.ycombinator.com | 26 Oct 2023
  • Show HN: Build type-safe web APIs with JavaScript, instantly
    5 projects | news.ycombinator.com | 25 Oct 2023
    And if you like Zod, you might as well use this: https://github.com/asteasolutions/zod-to-openapi

    It converts Zod types to OpenAPI specification.

  • Show HN: REST Alternative to GraphQL and tRPC
    8 projects | news.ycombinator.com | 10 Oct 2023
    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, 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:

  • A note from our sponsor - InfluxDB
    www.influxdata.com | 2 May 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Stats

Basic zod-to-openapi repo stats
3
690
8.3
27 days ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com