pub struct CommandMapping {
pub groups: HashMap<String, String>,
pub operations: HashMap<String, OperationMapping>,
}Expand description
Custom command tree mapping for an API specification.
Allows users to customize the CLI command tree structure generated from an
OpenAPI spec without modifying the original specification. This is especially
useful for third-party specs with verbose or awkward naming.
Config-based mappings take precedence over default tag/operationId naming.
Fields§
§groups: HashMap<String, String>Tag group renames: original tag name → custom display name.
The original tag (as it appears in the OpenAPI spec) is the key,
and the desired CLI group name is the value.
operations: HashMap<String, OperationMapping>Per-operation mappings keyed by the original operationId from the OpenAPI spec.
Trait Implementations§
Source§impl Clone for CommandMapping
impl Clone for CommandMapping
Source§fn clone(&self) -> CommandMapping
fn clone(&self) -> CommandMapping
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 moreSource§impl Debug for CommandMapping
impl Debug for CommandMapping
Source§impl Default for CommandMapping
impl Default for CommandMapping
Source§fn default() -> CommandMapping
fn default() -> CommandMapping
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CommandMapping
impl<'de> Deserialize<'de> for CommandMapping
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CommandMapping
impl PartialEq for CommandMapping
Source§impl Serialize for CommandMapping
impl Serialize for CommandMapping
impl Eq for CommandMapping
impl StructuralPartialEq for CommandMapping
Auto Trait Implementations§
impl Freeze for CommandMapping
impl RefUnwindSafe for CommandMapping
impl Send for CommandMapping
impl Sync for CommandMapping
impl Unpin for CommandMapping
impl UnsafeUnpin for CommandMapping
impl UnwindSafe for CommandMapping
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.