oag-cli 0.9.0

CLI for the oag OpenAPI code generator
oag-cli-0.9.0 is not a library.

oag-cli

Command-line interface for oag.

Installs a single binary called oag that parses OpenAPI specs and generates typed code (clients and servers).

Install

cargo install oag-cli

Commands

Command Description
oag generate Generate code from an OpenAPI spec
oag validate Validate an OpenAPI spec and report errors
oag inspect Dump the parsed intermediate representation (YAML or JSON)
oag init Create a .urmzd.oag.yaml config file in the current directory
oag completions <shell> Generate shell completions (bash, zsh, fish, etc.)

Configuration

The CLI automatically loads .urmzd.oag.yaml from the current directory. You can override the input spec with -i/--input:

# Use config file
oag generate

# Override input spec
oag generate -i other-spec.yaml

The new config format uses a generators map instead of a target field. Each generator has its own output directory and settings. See the root README for the full configuration reference.

The old config format (with target, output, output_options, and client fields) is still supported for backward compatibility.

Depends on

Part of oag