import type { Hook } from "@hono/zod-openapi"; /** * Shared `OpenAPIHono` `defaultHook` (voyant#2114). * * `@hono/zod-openapi` validates `request` schemas before the handler runs; * without a hook it returns `@hono/zod-validator`'s raw `safeParse` result as a * bare 400, bypassing the framework's `parseQuery`/`parseJsonBody` path and the * shared `{ error, code: "invalid_request", requestId, details }` contract that * clients and the error-boundary rely on. This hook re-routes failures through * the same `RequestValidationError` so `.openapi()` routes stay on-contract. * * Every module that constructs an `OpenAPIHono` must pass it: * * new OpenAPIHono({ defaultHook: openApiValidationHook }) * * (Validation runs on the instance that owns the route, so a hook on the * composed root app does NOT cover mounted module sub-apps.) */ export declare const openApiValidationHook: Hook;