Currently output is always generated as src/{apis,models} as done by:
|
protected String apiFolder = "src/apis"; |
|
protected String modelFolder = "src/models"; |
In our case we run with a very limited generator (we only want the models).
.openapi-generator-ignore:
**
.openapi-generator/*
!src/models/*.rs
What we end up doing is a little odd:
mkdir -p generated/rust
rm -rf ./src/api/models
docker run --user $(id -u) --rm -v "${PWD}:/local" -w /local/generated/rust openapitools/openapi-generator-cli:v7.12.0 generate -i /local/api/kiburi.v0.yml -g rust --config /local/.openapi-generator/rust/config.yaml
mv ./generated/rust/src/models ./src/api/model
Ideally it would be nicer if we could directly write the models etc to a subfolder inside our rust crate and not require manual modification.
I can imagine an additionalProperty: asModule: true or something like this.
Currently output is always generated as
src/{apis,models}as done by:openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
Lines 85 to 86 in 1655275
In our case we run with a very limited generator (we only want the models).
.openapi-generator-ignore:
What we end up doing is a little odd:
Ideally it would be nicer if we could directly write the models etc to a subfolder inside our rust crate and not require manual modification.
I can imagine an additionalProperty:
asModule: trueor something like this.