Server

The middleware package wires an analyzed OpenAPI spec into a working HTTP handler. Requests flow through a chain of stages — by default Router → Security → ContentType/Accept → Binder → Validator → OperationExecutor → Responder — composable via middleware.Builder. Generated typed APIs assemble an equivalent chain explicitly per operation; either way the runtime does not enforce a single fixed pipeline.

  • How an inbound HTTP request flows through middleware.Context — from routing to security to binding/validation to operation execution and response writing.
  • Server-side authenticator implementations — Basic, API key, Bearer, OAuth2 — and their context-aware *Ctx variants.
  • Doc-UI handlers, content negotiation and the header package have moved to the standalone server-middleware module — this page lists the old entry points and shows the migration.