codegenr 0.0.2

Fast json/yaml/openapi code generator based on handlebars templating.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use codegenr_lib::{opt::Opt, run_all_codegenr, Options};
use std::collections::HashMap;
use structopt::StructOpt;

fn main() -> Result<(), anyhow::Error> {
  tracing_subscriber::fmt::init();

  let options = Opt::from_args();

  let cmd = options.cmd.unwrap_or_default();
  let options_map: HashMap<String, Options> = cmd.try_into()?;
  run_all_codegenr(options_map)?;
  Ok(())
}