Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.74 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.74 KB

Overview

  • Find an ergonomic way (minimize boilerplate and code duplication) to get typed, zod-validated express routes and an OpenAPI schema at the same time
  • Minimize code duplication and boilerplate between express routes, request parameter validation, and OpenAPI definitions

Highlights

Run the example

Dependencies

  • @anatine/zod-openapi: generates request parameter OpenAPI definitions from zod schemas
  • openapi3-ts: used to define OpenAPI schema in TypeScript
  • swagger-ui-express: serves the OpenAPI documentation
  • zod: used to define request parameter validation schemas

Limitations

  • file upload routes must be documented manually
  • haven't tested nested routers / routes
  • not extensively tested