zuke.tools.openapi_ts

← Python API reference

@zuke/openapi-ts 1.0.1: @zuke/openapi-ts — typed openapi-ts task wrappers for Zuke builds.

Symbols

#

OpenapiTsGenerateSettings

class
class OpenapiTsGenerateSettings(ToolSettings)

Settings for an openapi-ts generation run.

  • input(value: str) -> Self

    OpenAPI specification to read — a file path or URL (--input).

  • output(value: str) -> Self

    Directory the generated client is written to (--output).

  • client(value: str) -> Self

    HTTP client to generate for, e.g. @hey-api/client-fetch (--client).

  • file(value: str) -> Self

    Configuration file to load settings from (--file).

  • dry_run() -> Self

    Print the planned output without writing any files (--dry-run).

  • watch() -> Self

    Regenerate on changes to the specification (--watch).

  • silent() -> Self

    Suppress informational logging (--silent).

#

OpenapiTsTasks

class
class OpenapiTsTasks

Typed task functions for the Hey API openapi-ts code generator.

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

    Generate a type-safe API client from an OpenAPI spec with openapi-ts.