Fast handlebars templates based code generator, ingesting swagger/openapi and other json/yaml documents with $refs, or graphql schema, outputs whatever you template
// momentum
// why it's here
- Active: last commit today
- Health 76/100 with only 32 stars
- Around since 2021 and still shipping
// how to help
// readme
CodeGenR
Installation
Install Rust, 1.91 or later : https://www.rust-lang.org/tools/install.
And then install codegenr
cargo install codegenr
or install the development version
cargo install --git https://github.com/eventuallyconsultant/codegenr --branch dev
codegenr runs every section of the codegenr.toml of the current folder, codegenr --help lists the other commands.
-v shows the debug logs, -vv the trace ones, and -q only the warnings and the errors.
While you write templates (gabarits), codegenr -w keeps running, and renders a section again as soon as a file of its template or custom helper folders changes.
It reads the source again first when the source changes, or a file one of its $ref leads to; a source or a $ref given as an url is not watched.
A change of codegenr.toml starts everything again, as a new run.
Documentation
codegenr documentation on docs.rs
Codegen Steps
Here is a simple folders/files Tree weβre gonna use in example