Expand description
Intermediate representation (IR) of generated Rust types.
The schema mapping pass (crate::lower::schema) lowers OpenAPI schemas into this
IR. The emit pass (crate::emit) turns the IR into a token stream. Keeping
the two separate makes the mapping logic testable without touching token
generation, and keeps emission free of OpenAPI concerns.
Structs§
- Alias
- A generated
type X = Y;alias. - Body
- A request or response body: its Rust type plus the wire content type that selects the axum extractor / response wrapper.
- Body
Variant - One content-type representation within a
NegotiatedBody. - Constraints
- The validation keywords a schema declares.
- Cookie
Param - A single cookie parameter within a
Cookiesstruct. - Cookies
- A generated per-operation cookie struct, extracted via a hand-written
axum::extract::FromRequestPartsimplementation backed byaxum_extra’sCookieJar. - Deprecation
- A
#[deprecated]annotation derived fromdeprecated: true, optionally carrying thex-deprecated-reasontext as thenote. - Enum
- A generated
enum. - Field
- A single struct field.
- Foreign
Derives - Which of the three non-serde traits every generated model derives a foreign type satisfies.
- Header
Param - A single header parameter within a
Headersstruct. - Headers
- A generated per-operation header struct, extracted via a hand-written
axum::extract::FromRequestPartsimplementation rather than serde, since header values are read and parsed individually from the request parts. - Integer
Variant - A unit variant of an integer enum.
- Module
- A generated Rust source module: an ordered list of top-level items.
- Multipart
- A
multipart/form-datarequest body lowered into a per-operation extractor. - Multipart
Field - A single field of a
Multipartbody. - Negotiated
Body - A body offering several content-type representations, lowered into a generated enum with one variant per representation.
- Operation
- A single HTTP operation lowered for code generation.
- Param
- A typed operation parameter (path parameter in the current slice).
- Response
Case - One arm of an operation’s response enum.
- Response
Header - A single declared response header written by the generated
IntoResponse. - Security
Scheme - A security scheme the client can apply to outgoing requests.
- Server
UrlBuilder - A server URL with
{placeholder}s emitted as a builder function that substitutes each variable and returns the resulting URL. - Server
UrlConst - A variable-free server URL emitted as a string constant.
- Server
UrlEnum - An enum type generated for an enum-constrained server variable.
- Server
UrlEnum Variant - One variant of a
ServerUrlEnum: a Rust identifier and its wire value. - Server
UrlParam - One parameter of a
ServerUrlBuilder, bound to a URL placeholder. - Server
Urls - The lowered
servers:block: constants and builder functions for each declared server URL, plus the enum types their variables reference. - Service
- A generated axum server interface: the
Apitrait plus the operations that back itsRouter. - String
Variant - A unit variant of a string enum.
- Struct
- A generated
struct. - Union
Variant - A newtype variant of a union enum.
Enums§
- Body
Kind - The supported request/response content type for a
Body. - Bound
- A numeric bound, in the form the document writes it.
- Default
Value - The value that serde uses when a property is absent.
- Enum
Kind - The flavour of a generated enum.
- Item
- A top-level item declaration.
- Request
Payload - An operation’s request payload, when it declares one.
- Response
Body - The body of a response variant, when it declares supported content.
- Response
Status - How a response variant’s HTTP status code is produced.
- Rust
Type - A Rust type expression usable in field/alias position.
- Security
Scheme Kind - How a
SecurityScheme’s credential is applied to a request. - Server
Url - A single lowered server URL: either a constant or a builder function.
- Server
UrlParam Type - The type of a
ServerUrlParam.