@zuke/redocly
`@zuke/redocly` — typed [Redocly CLI](https://redocly.com/docs/cli) task
@zuke/redocly on JSR ↗ 7 symbols
Symbols
class RedoclyBundleSettings extends RedoclySettings Settings for redocly bundle.
| Member | Signature | Doc |
|---|---|---|
paths | paths(...values: PathLike[]): this | The API descriptions to bundle — paths or aliases from the config (positional); repeatable. |
output | output(path: PathLike): this | Write the bundle to this file or directory (--output). |
dereferenced | dereferenced(): this | Inline every $ref instead of keeping the components (--dereferenced). |
ext | ext(value: json | yaml | yml): this | The output file extension, json, yaml, or yml (--ext). |
type RedoclyLintFormat = codeframe | stylish | json | checkstyle | markdown | summary The output format of a redocly lint run (--format).
class RedoclyLintSettings extends RedoclySettings Settings for redocly lint.
| Member | Signature | Doc |
|---|---|---|
paths | paths(...values: PathLike[]): this | The API descriptions to lint — paths or aliases from the config (positional); repeatable. |
skipRule | skipRule(...rules: string[]): this | Skip a rule for this run (--skip-rule); repeatable. Use it for a rule the description cannot satisfy yet, so the rest of the ruleset still gates the build instead of the whole lint being turned off. |
format | format(value: RedoclyLintFormat): this | Select the output format (--format). |
class RedoclySettings extends ToolSettings Base for all redocly subcommand settings: the binary is redocly, with the --config option every subcommand accepts.
| Member | Signature | Doc |
|---|---|---|
config | config(path: PathLike): this | Use an explicit config file (--config) instead of the discovered redocly.yaml. |
class RedoclySplitSettings extends RedoclySettings Settings for redocly split.
| Member | Signature | Doc |
|---|---|---|
api | api(path: PathLike): this | The API description to split into a multi-file structure (positional; required). |
outDir | outDir(path: PathLike): this | The directory the split files are written to (--outDir; required). |
separator | separator(value: string): this | The separator used in the generated path item file names (--separator). |
const RedoclyTasks: RedoclyTasksApi Typed task functions for the redocly CLI.
interface RedoclyTasksApi The shape of RedoclyTasks.
| Member | Signature | Doc |
|---|---|---|
lint | lint(configure?: Configure<RedoclyLintSettings>): Promise<CommandOutput> | Lint API descriptions: redocly lint. |
bundle | bundle(configure?: Configure<RedoclyBundleSettings>): Promise<CommandOutput> | Bundle an API description into one file: redocly bundle. |
split | split(configure?: Configure<RedoclySplitSettings>): Promise<CommandOutput> | Split an API description into a multi-file structure: redocly split. |