pub struct Operation {
pub operation_id: Option<String>,
pub method: HttpMethod,
pub path: String,
pub summary: Option<String>,
pub description: Option<String>,
pub parameters: Vec<OperationParam>,
pub request_body: Option<RequestBody>,
pub responses: Vec<OperationResponse>,
pub tags: Vec<String>,
}Expand description
A parsed OpenAPI operation.
Fields§
§operation_id: Option<String>§method: HttpMethod§path: String§summary: Option<String>§description: Option<String>§parameters: Vec<OperationParam>§request_body: Option<RequestBody>§responses: Vec<OperationResponse>Implementations§
Source§impl Operation
impl Operation
Sourcepub fn raw_name(&self) -> &str
pub fn raw_name(&self) -> &str
Get the raw operation name (without case conversion).
Uses the operation_id if available, otherwise falls back to the path.
Sourcepub fn name(&self) -> String
pub fn name(&self) -> String
Get the operation name in PascalCase.
Uses the operation_id if available, otherwise falls back to the path.
Sourcepub fn has_error_responses(&self) -> bool
pub fn has_error_responses(&self) -> bool
Check if this operation has any error responses defined (4xx, 5xx, or default).
Trait Implementations§
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
Mutably borrows from an owned value. Read more