Zuplo
Zuplo CLI

Zuplo CLI: OpenAPI Convert

Convert OpenAPI files between JSON and YAML formats
TerminalCode
zuplo oas convert --input <file> (--json|--yaml|--format <format>) [options]

Examples

Convert a YAML OpenAPI file to JSON format

TerminalCode
zuplo oas convert --input openapi.yaml --json

Convert a JSON OpenAPI file to YAML with custom output path

TerminalCode
zuplo oas convert -i openapi.json --yaml -o api-spec.yaml

Convert using --format flag instead of --json/--yaml

TerminalCode
zuplo oas convert --input api.yaml --format json

Options

--input

The input OpenAPI file (JSON or YAML)

Type: stringAlias: -i

--format

Output format

Type: stringChoices: json, yamlAlias: -f

--output

Output file path (if not specified, generates based on input)

Type: stringAlias: -o

--json

Convert to JSON format

Type: booleanConflicts: --yaml, --format

--yaml

Convert to YAML format

Type: booleanConflicts: --json, --format

Global options

The following global options are available for all commands:

Last modified on