OptionalbodyJSON Schema of the request body. When declared, the request body is parsed as JSON and validated against the schema. Violations are rejected with a client error carrying the validation messages as details, without invoking the handler, and the schema is published in the OpenAPI document.
The body must be sent with a Content-Type: application/json header; without it the
body is not parsed and the request is rejected as if it were empty.
OptionaldescriptionLonger description of the route; CommonMark.
OptionaljsonJSON body size limit of this route, e.g. '2mb'. Defaults to '1mb'. Only used together with bodySchema.
OptionaloperationStable operation id, unique across the external API, e.g. createChatSession.
OptionalparamsDocumentation of the route's path parameters, e.g. of id for a route registered on /:id.
OptionalresponsesDocumented responses of the route by status code. Declarative documentation only, not enforced.
OptionalsummaryShort summary of what the route does.
OptionalvalidateAdditional validation for constraints the bodySchema cannot express, such as
cross-field dependencies, running on the schema-valid body. Returns undefined (or an
empty string) when the body is valid, otherwise the error message the request is
rejected with. Only used together with bodySchema.
Options of a typed route, see ExternalApiRouter.