zuke.tools.redocly

← Python API reference

@zuke/redocly 1.0.0: @zuke/redocly — typed [Redocly CLI](https://redocly.com/docs/cli) task wrappers for Zuke builds.

Symbols

#

RedoclyBundleSettings

class
class RedoclyBundleSettings(RedoclySettings)

Settings for redocly bundle.

  • paths(*values: str) -> Self

    The API descriptions to bundle — paths or aliases from the config (positional); repeatable.

  • output(path: str) -> Self

    Write the bundle to this file or directory (--output).

  • dereferenced() -> Self

    Inline every $ref instead of keeping the components (--dereferenced).

  • ext(value: Literal['json', 'yaml', 'yml']) -> Self

    The output file extension, json, yaml, or yml (--ext).

#

RedoclyLintSettings

class
class RedoclyLintSettings(RedoclySettings)

Settings for redocly lint.

  • paths(*values: str) -> Self

    The API descriptions to lint — paths or aliases from the config (positional); repeatable.

  • skip_rule(*rules: str) -> Self

    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(value: Literal['codeframe', 'stylish', 'json', 'checkstyle', 'markdown', 'summary']) -> Self

    Select the output format (--format).

#

RedoclySettings

class
class RedoclySettings(ToolSettings)

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

  • config(path: str) -> Self

    Use an explicit config file (--config) instead of the discovered redocly.yaml.

#

RedoclySplitSettings

class
class RedoclySplitSettings(RedoclySettings)

Settings for redocly split.

  • api(path: str) -> Self

    The API description to split into a multi-file structure (positional; required).

  • out_dir(path: str) -> Self

    The directory the split files are written to (--outDir; required).

  • separator(value: str) -> Self

    The separator used in the generated path item file names (--separator).

#

RedoclyTasks

class
class RedoclyTasks

Typed task functions for the redocly CLI.

  • static async lint(ctx: ServiceContext, configure: Callable[[RedoclyLintSettings], RedoclyLintSettings] | None=None) -> ExecResult

    Lint API descriptions: redocly lint.

  • static async bundle(ctx: ServiceContext, configure: Callable[[RedoclyBundleSettings], RedoclyBundleSettings] | None=None) -> ExecResult

    Bundle an API description into one file: redocly bundle.

  • static async split(ctx: ServiceContext, configure: Callable[[RedoclySplitSettings], RedoclySplitSettings] | None=None) -> ExecResult

    Split an API description into a multi-file structure: redocly split.