The document info.
OptionalonSkipped: (skipped: { reason: string; what: string }) => void
Told when a schema could not be described, so a gap is visible rather than silent.
Add one operation.
The HTTP method.
The path (OpenAPI style, e.g. /users/{id}).
The operation definition.
This generator.
Derive every documented path from a router.
The routing table already says what each endpoint is: its path, its method, what it accepts and whether it is protected. Reading it makes the document a view of the application rather than a second description of it, so there is nothing to restate and nothing that can drift.
The router, duck-typed so this module does not depend on @stone-js/router.
How to resolve a name a route used instead of an inline value.
This generator.
Register a reusable component schema.
The schema name.
The schema (Zod or JSON Schema).
This generator.
Add a server entry.
The server URL.
Optionaldescription: string
Optional description.
This generator.
Add a tag.
The tag name.
Optionaldescription: string
Optional description.
This generator.
StaticcreateThe document info.
OptionalonSkipped: (skipped: { reason: string; what: string }) => voidA new generator.
Builds an OpenAPI 3.0 document from your Zod schemas and routes.
You describe operations declaratively (request/response as Zod schemas or raw JSON Schema); the generator converts them, assembles parameters, request bodies and responses, and emits a valid document you can serve as JSON and render with Swagger UI. It is decoupled from the router: feed it routes via OpenApiGenerator.addRoutes or add paths explicitly.