path params
query params
request body
response body
which context to place this route in, see globalContext
express router
path the route happens, same format as used in express but avoid features not supported in openapi (e.g. advanced path matchers)
zod schemas of the parts of the request and response, use
emptyFormat to fill in default values
route handler
Optionaldocs: { description?: string; summary?: string }
information that should end up in the openapi spec
Optionaldescription?: stringa longer explanation, commonmark accepted
Optionalsummary?: stringa short description of what is route does, becomes the title
the handler function that got passed to router.post internally,
to be used in testing
Wrapper around router.post with built in validation and schema recording, more details can be found in addGetRoute.