Expand description
OpenAPI Forge intermediate representation.
These types are the canonical Rust shape of the IR. They mirror the WIT
definitions in wit/ir.wit exactly. The forge-ir-bindgen crate handles
conversion to and from the WIT-generated representation that crosses the
component boundary.
Pre-1.0 the IR is unstable: every change is a breaking change, and there is
no api-version field. Plugins built against a different forge-ir
version will fail at component load time with a WIT type error.
See docs/ir-spec.md for the full contract.
Re-exports§
pub use diagnostic::Diagnostic;pub use diagnostic::FixEdit;pub use diagnostic::FixSuggestion;pub use diagnostic::RelatedInfo;pub use diagnostic::Severity;pub use diagnostic::SpecLocation;pub use operation::Body;pub use operation::BodyContent;pub use operation::Encoding;pub use operation::Header;pub use operation::HttpMethod;pub use operation::Operation;pub use operation::Parameter;pub use operation::ParameterStyle;pub use operation::Response;pub use operation::ResponseStatus;pub use security::ApiKeyLocation;pub use security::ApiKeyScheme;pub use security::OAuth2Flow;pub use security::OAuth2FlowKind;pub use security::OAuth2Scheme;pub use security::SecurityRequirement;pub use security::SecurityScheme;pub use security::SecuritySchemeKind;pub use types::AdditionalProperties;pub use types::ArrayConstraints;pub use types::ArrayType;pub use types::EnumIntType;pub use types::EnumIntValue;pub use types::EnumStringType;pub use types::EnumStringValue;pub use types::IntKind;pub use types::NamedType;pub use types::ObjectConstraints;pub use types::ObjectType;pub use types::PrimitiveConstraints;pub use types::PrimitiveKind;pub use types::PrimitiveType;pub use types::Property;pub use types::TypeDef;pub use types::TypeRef;pub use types::NULL_ID;pub use types::Discriminator;pub use types::UnionKind;pub use types::UnionType;pub use types::UnionVariant;pub use value::Value;pub use value::ValueRef;
Modules§
- diagnostic
- Diagnostics and source locations.
- operation
- Operations, parameters, request bodies, and responses.
- security
- Security schemes and requirements.
- types
- Type-system pieces of the IR.
- value
- Structured value used for defaults, examples, extensions, link parameters, and constraint values.
Structs§
- ApiInfo
- Callback
- OAS Callback Object — describes out-of-band requests the API makes back to the caller. Used heavily by event-driven and webhook APIs.
- Contact
- Example
- OAS Example Object. Carried in a
Vec<(String, Example)>onParameter/BodyContent/NamedType(named, ordered). 3.0 specs that declare a single bareexample(no name) are stored under the synthetic key"_default"so generators have one shape to read. - External
Docs - OAS ExternalDocumentation Object.
urlis required;descriptionis CommonMark-flavoured prose. - Ir
- Top-level IR document.
- Link
- OAS Link Object — HATEOAS-style “given this response, here’s how to
call the next operation”. Carried in a
Vec<(String, Link)>onResponse.links(named, ordered). - Plugin
Info - Server
- Server
Variable - Tag
- Top-level
tags[]entry. Generators surfacedescriptionandsummaryas group-level docs and useparent(3.2) to render nested operation menus. - Webhook
- OpenAPI 3.1+ inbound webhook entry. The spec keys webhooks under a
map name (
newPet,deletedPet); that name is the routing identifier a webhook-handler generator dispatches on. A single path item can hold multiple HTTP-method operations, all sharing the same name. - XmlObject
- OAS Schema Object’s
xmlblock: governs how the schema serializes to XML — element name override, namespace, prefix, attribute-vs- element placement, array wrapping. No in-tree generator currently emits XML clients; the IR carries the data so a future XML-capable generator can consume it.