#[non_exhaustive]pub struct ApiOperation {
pub operation_id: String,
pub method: String,
pub path: String,
pub group: String,
pub summary: String,
pub path_params: Vec<Param>,
pub query_params: Vec<Param>,
pub header_params: Vec<Param>,
pub body_schema: Option<Value>,
pub body_required: bool,
}Expand description
A parsed API operation ready for CLI command generation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.operation_id: StringoperationId from the spec (e.g. “CreatePod”)
method: StringHTTP method (GET, POST, etc.)
path: StringURL path template (e.g. “/pods/{podId}”)
group: StringFirst tag (used as command group)
summary: StringSummary text for help
path_params: Vec<Param>Path parameters
query_params: Vec<Param>Query parameters
header_params: Vec<Param>Header parameters
body_schema: Option<Value>Request body JSON schema (if any)
body_required: boolWhether request body is required
Trait Implementations§
Source§impl Clone for ApiOperation
impl Clone for ApiOperation
Source§fn clone(&self) -> ApiOperation
fn clone(&self) -> ApiOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ApiOperation
impl RefUnwindSafe for ApiOperation
impl Send for ApiOperation
impl Sync for ApiOperation
impl Unpin for ApiOperation
impl UnsafeUnpin for ApiOperation
impl UnwindSafe for ApiOperation
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