@tico-org/tico-oas-cli
v0.1.0
Published
OAS CLI
Readme
tico-oas-cli - 0.1.0 - experimental
A command-line tool for all OpenAPI Specifications (OAS) related tooling.
Install
pnpm add --dev @tico-org/tico-oas-cli
Configuration / First time setup
N/A
How to use
pnpm tico-oas <command>Command - client
Will generate API client files from a given OAS file.
--src-file <path>
Specify the path to the OAS JSON file.
pnpm tico-oas client --src-file ./store.oas.json
--name <name>
Namespace for the generated client. Usually admin or store.
pnpm tico-oas client --name admin
--out-dir <path>
Specify in which directory should the files be outputted. Accepts relative and absolute path. It the directory doesn't
exist, it will be created. Defaults to ./.
pnpm tico-oas client --out-dir ./client
--type <type>
Client component types to generate. Accepts all, types, client, hooks.
Defaults to all.
pnpm tico-oas client --type types
--types-packages <name>
Replace relative import statements by types package name. Mandatory when using --type client or --type hooks.
--client-packages <name>
Replace relative import statements by client package name. Mandatory when using --type hooks.
pnpm tico-oas client --type types
--clean
Delete destination directory content before generating client.
pnpm tico-oas --clean
