pub struct Callback {
pub name: String,
pub expression: String,
pub operation_ids: Vec<String>,
pub extensions: Vec<(String, ValueRef)>,
}Expand description
OAS Callback Object — describes out-of-band requests the API makes back to the caller. Used heavily by event-driven and webhook APIs.
The OAS shape is callbacks: { <name>: { <expression>: PathItem } }
(a name maps to a map of runtime expressions, each pointing to a
path item). The IR flattens this: each Callback carries one
(name, expression) pair plus the ids of the operations the path
item declared. A callback name with multiple expressions becomes
multiple Callback entries with the same name.
operation_ids reference into Ir::operations — callback path-
item operations live in the same flat list as top-level paths so
the WIT shape stays non-recursive. OAS operationId uniqueness is
API-wide, so this is consistent with the spec.
Fields§
§name: String§expression: StringRuntime expression keyed by the path-item entry, e.g.
{$request.body#/callbackUrl}. Verbatim from the spec.
operation_ids: Vec<String>Ids referencing into Ir::operations.
extensions: Vec<(String, ValueRef)>