I needed to add more derive traits on the enum generated by openapi-generate-cli
e.g. strum::EnumIter
.
openapi-generator-cli author template -g rust
. This will write templates to the directory out
.out
directory. I had to add strum
to Cargo.mutache
and strum::EnumIter
inside derive of all pub enum
inside model.mustache
file.openapi-generator-cli generate -t out -i openapi.json -g rust -o api-client-rs
And you have updated client.
Here are some diffs
PS: I could not get the local version to run on my system. I used the following docker command
podman run --rm \\
-v $PWD:/local openapitools/openapi-generator-cli generate \\
-i <https://beta.oneapi.dognosis.link/api/v1/openapi.json> \\
-t /local/templates \\
-g rust \\
-o /local/oneapi-client-rs