Major Changes
-
#85
44daccaThanks @lorisleiva! - RefactorrenderVisitorto usecrateFolderas its primary argument instead of the generated output path. The generated folder is now derived internally using a newgeneratedFolderoption (defaults to'src/generated'). Remove thecrateFolderoption as it is no longer needed.BREAKING CHANGES
First argument of
renderVisitorchanged from output path to crate folder. The function now takes the crate folder (whereCargo.tomllives) and derives the generated output path internally.- const visitor = renderVisitor('clients/rust/src/generated', { - crateFolder: 'clients/rust', - }); + const visitor = renderVisitor('clients/rust');crateFolderoption removed. It is replaced by the first argument ofrenderVisitor.New
generatedFolderoption. Defaults to'src/generated'and can be customized to change the output path relative to the crate folder.- const visitor = renderVisitor('clients/rust/my/custom/path', { - crateFolder: 'clients/rust', - }); + const visitor = renderVisitor('clients/rust', { + generatedFolder: 'my/custom/path', + });
Patch Changes
- #70
f0fbbb0Thanks @lorisleiva! - AddsyncCargoTomlanddependencyVersionsoptions in order to create or update the Cargo.toml of the Rust crate when generating its code.