pub struct Operation {Show 15 fields
pub path: String,
pub method: String,
pub operation_id: Option<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub parameters: Vec<Parameter>,
pub request_body: Option<RequestBody>,
pub dispatch: Option<DispatchConfig>,
pub middlewares: Option<Vec<MiddlewareConfig>>,
pub deprecated: bool,
pub sunset: Option<String>,
pub extensions: BTreeMap<String, Value>,
pub messages: Vec<Message>,
pub bindings: BTreeMap<String, Value>,
pub responses: BTreeMap<String, ResponseContent>,
}Expand description
A single API operation (path + method for OpenAPI, channel + action for AsyncAPI).
Fields§
§path: StringThe path template (OpenAPI: “/users/{id}”, AsyncAPI: channel address).
method: StringThe HTTP method (OpenAPI: “GET”, AsyncAPI: “SEND”/“RECEIVE”).
operation_id: Option<String>The operationId, if present.
summary: Option<String>The operation summary (short description for MCP tool name).
description: Option<String>The operation description (detailed description for MCP tool).
parameters: Vec<Parameter>Path/channel parameters defined on this operation.
request_body: Option<RequestBody>Request body definition (OpenAPI: requestBody, AsyncAPI: message payload for SEND).
dispatch: Option<DispatchConfig>The dispatcher configuration from x-barbacane-dispatch.
middlewares: Option<Vec<MiddlewareConfig>>Operation-level middlewares (replaces global chain if present).
deprecated: boolWhether this operation is deprecated (OpenAPI deprecated field).
sunset: Option<String>Sunset date for deprecated operations (from x-sunset per RFC 8594).
Format: HTTP-date per RFC 9110 (e.g., “Sat, 31 Dec 2024 23:59:59 GMT”).
extensions: BTreeMap<String, Value>Operation-level x-barbacane-* extensions.
messages: Vec<Message>AsyncAPI messages (for async operations only).
bindings: BTreeMap<String, Value>Protocol bindings (AsyncAPI: kafka, nats, mqtt, amqp, ws).
responses: BTreeMap<String, ResponseContent>Response definitions keyed by status code (e.g., “200”, “201”).