mint-oapi-codegen plugin for the asdf version manager.
bash,curl,tar, and POSIX utilities.- Go 1.21 or later - required to build mint-oapi-codegen from source
Plugin:
asdf plugin add mint-oapi-codegen
# or
asdf plugin add mint-oapi-codegen https://github.com/saviorand/asdf-mint-oapi-codegen.gitmint-oapi-codegen:
# Show all installable versions
asdf list all mint-oapi-codegen
# Install specific version
asdf install mint-oapi-codegen latest
# Set a version globally (on your ~/.tool-versions file)
asdf set --home mint-oapi-codegen latest
# Now mint-oapi-codegen commands are available
mint-oapi-codegen --versionCheck asdf readme for more instructions on how to install & manage versions.
Once installed, use mint-oapi-codegen to generate Mint client code from OpenAPI specs:
# Generate with a config file
mint-oapi-codegen -config cfg.yaml api.yaml
# Generate with inline options
mint-oapi-codegen \
-package BlogApi \
-generate types,client \
-o blog-api.gen.mint \
api.yamlExample configuration (cfg.yaml):
package: BlogApi
output: blog-api.gen.mint
generate:
models: true
client: trueSee the mint-oapi-codegen repository for more documentation.
Contributions of any kind welcome! See the contributing guide.