Each endpoint is declared once, with a zod schema for what comes in and what goes out. From that one declaration you get three things: the handler Express serves, the OpenAPI JSON for your docs, and a TypeScript client for the frontend. The constraint: the declaration is not a server.

Source: [Dev.to](https://dev.to/panthpatel/one-zod-schema-per-route-express-handler-openapi-and-ts-client-4m7f)

Sponsored