pub struct Operation {
pub method: String,
pub path: String,
pub parameters: Vec<Parameter>,
pub has_request_body: bool,
pub base_url: Option<String>,
}Expand description
An extracted REST operation backed by an OpenAPI definition.
The AUTHORITATIVE request model the crate::http::HttpConnector::execute
signature names (re-exported from crate::http). Plan 01 defined a minimal
shape; Plan 03 makes this the canonical home and populates these values from
an openapiv3 parse. The shape mirrors the pmcp-run reference
mcp-openapi-server-core::schema::Operation.
Fields§
§method: StringHTTP method (GET, POST, …).
path: StringPath template, e.g. "/users/{id}".
parameters: Vec<Parameter>Input parameters (path / query / header).
has_request_body: boolWhether this operation expects a request body.
base_url: Option<String>Per-tool base-URL override (D-06 / Codex MEDIUM). When Some, this
operation targets the given host instead of the configured [backend]
base_url. Carried so the synthesizer NEVER silently drops a per-tool
base_url; None means inherit the connector’s configured base.
Implementations§
Source§impl Operation
impl Operation
Sourcepub fn path_parameters(&self) -> Vec<&Parameter>
pub fn path_parameters(&self) -> Vec<&Parameter>
Path parameters (the {...} segments of Operation::path).
Sourcepub fn query_parameters(&self) -> Vec<&Parameter>
pub fn query_parameters(&self) -> Vec<&Parameter>
Query parameters.
Sourcepub fn header_parameters(&self) -> Vec<&Parameter>
pub fn header_parameters(&self) -> Vec<&Parameter>
Header parameters.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more