Wave 2: CLI skeleton, cache write, config system, spec indexer (bd-3d2, bd-1ie, bd-1sb, bd-189)
This commit is contained in:
26
src/cli/list.rs
Normal file
26
src/cli/list.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use clap::Args as ClapArgs;
|
||||
|
||||
use crate::errors::SwaggerCliError;
|
||||
|
||||
/// List endpoints from a cached spec
|
||||
#[derive(Debug, ClapArgs)]
|
||||
pub struct Args {
|
||||
/// Alias of the cached spec
|
||||
pub alias: String,
|
||||
|
||||
/// Filter by HTTP method
|
||||
#[arg(long)]
|
||||
pub method: Option<String>,
|
||||
|
||||
/// Filter by tag
|
||||
#[arg(long)]
|
||||
pub tag: Option<String>,
|
||||
|
||||
/// Filter by path pattern
|
||||
#[arg(long)]
|
||||
pub path: Option<String>,
|
||||
}
|
||||
|
||||
pub async fn execute(_args: &Args, _robot: bool) -> Result<(), SwaggerCliError> {
|
||||
Err(SwaggerCliError::Usage("list not yet implemented".into()))
|
||||
}
|
||||
Reference in New Issue
Block a user