Skip to main content

Module servers

Module servers 

Source
Expand description

Lowering the spec’s servers: block into the ServerUrls IR.

Each declared server becomes either a constant (no {placeholder} in the URL) or a builder function that substitutes its variables. Enum-constrained variables additionally produce a dedicated Rust enum type so callers pass a validated value rather than a bare string.

This mirrors oapi-codegen’s server-urls generator, including its handling of declared-but-unused variables (skipped) and URL placeholders with no matching variable (emitted as free-form &str parameters).

Functions§

lower_server_urls
Lower the spec’s servers: into the ServerUrls IR, or None when the document declares no servers.