1use clap::Args;
2use std::path::PathBuf;
3use crate::mds::schema::schema_command;
4use crate::mds::schema::Language;
5
6#[derive(Args)]
7pub struct SchemaArgs {
8 target: PathBuf,
9 #[arg(short = 'l', long, default_value = "rust")]
10 lang: Language,
11 #[arg(short, long)]
12 output: Option<PathBuf>,
13 #[arg(short, long)]
14 verbose: bool,
15 #[arg(short, long)]
16 quiet: bool,
17}
18
19
20pub fn run(args: SchemaArgs) -> anyhow::Result<()> {
21 let input = args.target;
22 let lang = args.lang;
23 let output = args.output;
24 let schema_result = schema_command(input, lang, output, args.verbose)
25 .map_err(|e| anyhow::anyhow!("Schema command failed: {}", e))?;
26 Ok(())
27}