The runtime endpoint descriptor a route can carry — the one first-class valuethat replaces FastAPI reading a handler's signature. Walked once for theOpenAPI operation (parameters + requestBody + responses, with every namedobject hoisted into components/schemas) and for request validation.
Build an endpoint descriptor. Everything is optional: a bare Endpoint::new()describes an endpoint with no parameters, no body, and (on emit) a default200 OK response.
Validate an inbound request ctx against this endpoint descriptor: everydeclared parameter (path / query / header / cookie) plus the JSON requestbody, all off the same descriptor tree that emits the OpenAPI operation.Returns the accumulated errors — an empty array means the request conforms,otherwise pass them to unprocessable for a FastAPI-shaped 422.
A named example of a value (the OpenAPI Example Object, ← FastAPI'sopenapi_examples): a summary and a description for the reader, andeither the value itself or an external_value URL where it can be fetched.Documentation viewers offer the examples of a parameter or a body by name.
A single request parameter descriptor: its name, location, scalarschema, whether it is required, an optional description, its valueconstraints, the default that stands in when the request omits it, andthe alias it travels under on the wire. Path parameters are always required(OpenAPI requires it); the constructor keeps the caller's value butvalidation treats path params as mandatory.
Whether a request must carry this parameter. One with a default never must —its absence is answered by the default, exactly as a Python default argumentis.
The name this parameter travels under: its alias when it has one, else itsown name. This is what is read off the request, what the document calls it,and what a validation error's loc points at — all three being the client'sview of the parameter.
Build a parameter descriptor. schema defaults to a string and required totrue. constraints are the Pydantic-style bounds FastAPI reads off aQuery(ge=…, max_length=…) — emitted into the parameter's documented schemaand enforced on the inbound value. default is emitted and makes theparameter optional, since a value that has one is never missing. alias isthe name the parameter travels under when that differs from the one the codecalls it (← Query(alias="item-query")). examples are offered by name inthe documentation (← Query(openapi_examples=…)).
A single response descriptor: the HTTP status, a human description, anoptional body schema (None for an empty body, e.g. 204), and namedexamples of that body.