@zuke/redocly

← API reference

`@zuke/redocly` — typed [Redocly CLI](https://redocly.com/docs/cli) task

Symbols

#

RedoclyBundleSettings

class
class RedoclyBundleSettings extends RedoclySettings

Settings for redocly bundle.

MemberSignatureDoc
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).
#

RedoclyLintFormat

type
type RedoclyLintFormat = codeframe | stylish | json | checkstyle | markdown | summary

The output format of a redocly lint run (--format).

#

RedoclyLintSettings

class
class RedoclyLintSettings extends RedoclySettings

Settings for redocly lint.

MemberSignatureDoc
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).
#

RedoclySettings

class
class RedoclySettings extends ToolSettings

Base for all redocly subcommand settings: the binary is redocly, with the --config option every subcommand accepts.

MemberSignatureDoc
config config(path: PathLike): this Use an explicit config file (--config) instead of the discovered redocly.yaml.
#

RedoclySplitSettings

class
class RedoclySplitSettings extends RedoclySettings

Settings for redocly split.

MemberSignatureDoc
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).
#

RedoclyTasks

const
const RedoclyTasks: RedoclyTasksApi

Typed task functions for the redocly CLI.

#

RedoclyTasksApi

interface
interface RedoclyTasksApi

The shape of RedoclyTasks.

MemberSignatureDoc
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.