Skip to content

mooncake schema

Generate JSON Schema and OpenAPI specifications from action metadata

Description

Generate JSON Schema, OpenAPI specifications, and TypeScript definitions from mooncake's action registry and Go struct definitions.

This ensures the schema is always in sync with the code and provides IDE autocomplete, validation, and API documentation.

Formats: - json: JSON Schema for YAML validation (default) - yaml: JSON Schema in YAML format - openapi: OpenAPI 3.0 specification - typescript: TypeScript definitions (.d.ts)

Examples: mooncake schema generate mooncake schema generate --output schema.json mooncake schema generate --format yaml --output schema.yml mooncake schema generate --format openapi --output openapi.json mooncake schema generate --format typescript --output mooncake.d.ts mooncake schema validate --schema schema.json --config config.yml

Subcommands

  • generate — Generate schema from action metadata
  • validate — Validate existing schema against current code