pub struct Ir {
pub info: ApiInfo,
pub operations: Vec<Operation>,
pub types: Vec<NamedType>,
pub security_schemes: Vec<SecurityScheme>,
pub servers: Vec<Server>,
pub webhooks: Vec<Webhook>,
pub external_docs: Option<ExternalDocs>,
pub tags: Vec<Tag>,
pub json_schema_dialect: Option<String>,
pub self_url: Option<String>,
pub values: Vec<Value>,
}Expand description
Top-level IR document.
Fields§
§info: ApiInfo§operations: Vec<Operation>Sorted by id for determinism.
types: Vec<NamedType>Topologically sorted; every TypeRef resolves to one of these by id.
security_schemes: Vec<SecurityScheme>§servers: Vec<Server>§webhooks: Vec<Webhook>OpenAPI 3.1+ inbound webhooks. Each entry pairs the spec’s
webhooks.<name> map key (the routing identifier) with the
path item’s operations. Sorted by name for determinism.
Generators that only emit outbound clients can ignore this
field; webhook-handler generators dispatch on Webhook.name.
external_docs: Option<ExternalDocs>Root-level externalDocs. Per-operation and per-schema slots
live on Operation / NamedType respectively.
Top-level tags array, walked into structured records. Sorted
by name for determinism. Operation.tags stays a flat list
of names that reference into this list.
json_schema_dialect: Option<String>OpenAPI 3.1+ jsonSchemaDialect — declares which JSON Schema
draft the document’s schemas conform to. Carried verbatim
(URL string); the parser does not validate or switch dialects
based on it. Generators that care can read it; most ignore it.
self_url: Option<String>OpenAPI 3.2 $self — the document’s canonical URI for
base-URI resolution per RFC 3986. The parser captures it
verbatim; full base-URI semantics for external-$ref
resolution land in #93.
values: Vec<Value>Pool of every structured Value referenced from elsewhere in
the IR (defaults, examples, link parameters, extensions,
constraint bounds). Compound Value::List / Value::Object
arms hold ValueRef indices into this list — see ADR-0007’s
amendment and crates/forge-ir/src/value.rs for the design.