CLI Usage
Command
bash
api-sdk-generator generate [options]Options
--url <url>: load the OpenAPI schema from a remote URL--file <path>: load the OpenAPI schema from a local JSON or YAML file--output <path>: target directory for generated files--name <sdkName>: override the generated SDK name--base-url <baseUrl>: override the detected server URL--dry-run: validate and preview generated file names without writing--check: compare generated files with disk without writing--clean: delete the output directory before writing files--timeout <ms>: positive schema download deadline in milliseconds, default30000--verbose: print debug logs
Validation rules
- exactly one of
--urlor--fileis required --outputis always required--urland--base-urlmust be absolute HTTP(S) URLs
Exit behavior
--checkand--dry-runare mutually exclusivepreview and check modes never clean or write the output directory
0on success1on validation errors, schema errors, or generation failures2when--checkdetects missing or outdated generated files
--check compares only the four generated files, ignoring unrelated files. Regenerate with the same SDK name/base URL options used for the check.