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:429
Signatures
ts
function generateCommandSchema(schema: CommandSchema, options?: JsonSchemaOptions, meta?: ExampleMeta): CommandDefinitionDocumentV1;| Parameter | Type | Description |
|---|---|---|
schema | CommandSchema | The command schema to serialize. |
options | JsonSchemaOptions | undefined | Generation options. |
meta | ExampleMeta | undefined | Program name/version for function-form examples; defaults to the command's own name with no version. |
Members
Members
generateCommandSchema
Generate the definition metadata document for a single command.
The per-command counterpart of generateSchema: one entry of its commands array (flags, args, subcommands, examples), plus the schemaVersion every standalone document carries. Powers --help in --json mode and is useful for embedding one command's definition into custom tooling.
ts
(schema: CommandSchema, options?: JsonSchemaOptions, meta?: ExampleMeta): CommandDefinitionDocumentV1;