I needed to add more derive traits on the enum generated by openapi-generate-cli e.g. strum::EnumIter.
- First, dump the templates using the following command
openapi-generator-cli author template -g rust. This will write templates to the directoryout. - Now edit the templates inside
outdirectory. I had to addstrumtoCargo.mutacheandstrum::EnumIterinside derive of allpub enuminsidemodel.mustachefile. - Now regenerate the client using
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
