generateCommandSchema
Generated reference page for the generateCommandSchema function export.
- Import:
@kjanat/dreamcli - Export kind: function
- Declared in:
src/core/json-schema/index.ts - Source link:
src/core/json-schema/index.ts:169
Signatures
ts
function generateCommandSchema(schema: CommandSchema, options?: JsonSchemaOptions): Record<string, unknown>;| Parameter | Type | Description |
|---|---|---|
schema | CommandSchema | The command schema to serialize. |
options | JsonSchemaOptions | undefined | Generation options. |
Members
Members
generateCommandSchema
Generate the definition metadata document for a single command.
The per-command counterpart of generateSchema: the same JSON-serializable shape as one entry of its commands array (flags, args, subcommands, examples). Powers --help in --json mode and is useful for embedding one command's definition into custom tooling.
ts
(schema: CommandSchema, options?: JsonSchemaOptions): Record<string, unknown>;