{"schemaVersion":1,"id":"zod-to-openapi","name":"zod-to-openapi","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/zod-to-openapi/","officialUrl":"https://github.com/asteasolutions/zod-to-openapi","isCatalog":false,"description":"An OpenAPI document generator from Zod schemas: it helps synchronize runtime validation and your backend's public API description.","tasks":["Align OpenAPI documentation with Zod validation","Generate an OpenAPI description and check it against the running endpoint"],"categoryIds":["backend"],"subcategoryIds":["backend.api"],"tags":["zod-to-openapi","API","Development"],"aliases":["asteasolutions/zod-to-openapi","zod-to-openapi","generate-openapi-docs","swagger-from-zod"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Align OpenAPI documentation with Zod validation","chooseWhen":["Align OpenAPI documentation with Zod validation","Generate an OpenAPI description and check it against the running endpoint"],"considerInstead":[],"requirements":["Align Zod and generator majors before connecting: the current README targets Zod 4; Zod 3 separately uses the older 7.3.4 release without further active support."],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: MIT for the code; dependencies have separate licenses.","Not every Zod type automatically converts into OpenAPI: unsupported types may trigger UnknownZodTypeError. The README permits manual descriptions through .openapi, so check generated results for complex schemas."],"faq":[{"question":"What can you use for free in zod-to-openapi?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with zod-to-openapi?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for zod-to-openapi?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with zod-to-openapi?","answer":"Prepare Zod schemas for backend requests and responses. Generate an OpenAPI description and check it against the running endpoint. Add error handling and an integration check of the result."},{"question":"Does the generator automatically prove an endpoint matches a Zod schema?","answer":"No. The library generates OpenAPI definitions from supplied schemas, registry paths, and metadata. This describes a contract; endpoint execution and runtime validation remain in your backend and require separate testing."}],"related":[],"sources":["https://github.com/asteasolutions/zod-to-openapi","https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/README.md","https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/LICENSE","https://www.open-source-tools.com/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Align OpenAPI documentation with Zod validation.","inputs":["A data contract or HTTP workflow.","A project with a supported runtime."],"steps":["Prepare Zod schemas for backend requests and responses.","Generate an OpenAPI description and check it against the running endpoint.","Add error handling and an integration check of the result."],"checks":["Invalid and missing data are handled predictably.","Types and the actual response agree; errors are not hidden."]},"sources":["https://github.com/asteasolutions/zod-to-openapi","https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/README.md","https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/LICENSE","https://www.open-source-tools.com/"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"Backend / API library","kind":"library","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/asteasolutions/zod-to-openapi","label":"Official source"},{"url":"https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}