Crates.io | codegenr |
lib.rs | codegenr |
version | 0.0.2 |
source | src |
created_at | 2021-12-14 16:13:17.050537 |
updated_at | 2022-01-26 10:03:50.141453 |
description | Fast json/yaml/openapi code generator based on handlebars templating. |
homepage | https://github.com/eventuallyconsultant/codegenr/ |
repository | https://github.com/eventuallyconsultant/codegenr/ |
max_upload_size | |
id | 497794 |
size | 438,298 |
Install Rust : 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 documentation on docs.rs
The defaults Handlebars helpers are documented here.
You can also open the repository in GitPod with this button
In the command line you can :
cargo test --workspace
to launch all the unit testscargo doc --open
to compile and open the local documentationcargo doc --open
compile and open the documentationcargo install --path codegenr
installs codegenr command line from sourcescargo install --git https://github.com/eventuallyconsultant/codegenr --branch dev
installs codegenr command line from the latest github dev
branchThis tool is based on the design of a precedent one written in C#
: CodegenUP.
Load a yaml or json to serde::json
Resolve $ref
tags
Pass all the resulting document to an handlebar template
Implement some default helper (and make some doc tests about them)
A plugin system
Migrate C# custom helpers to this new plugin system
A this point, we could use codegenr
in place of CodegenUP
, just by calling some commands
Rename codegenr-cli
to codegenr
& codegenr
to codegenr-lib
Publish on crates.io
Be able to have a codegenr.toml
on a workspace root to describe all the templates to execute around the workspace
Better Errors (typed ones)
Resolved Json Cache optimisation
all tests passing on windows too
Verbose/Tracing? mode
Better examples
Smol strings optimisation ?
Watch mode for the file changes
Make a VSCode extension about all of this to make it live / super user friendly for everyone
Allow multiple swagger2 documents merging
Allow multiple swagger3 documents merging
Transform the json to an OpenApi Generator model, and be able to use all the OpenApi Generator
templates ?