Skip to content

Make the CLI bilingual for OpenAPI and AsyncAPI 3 - #283

Merged
daveshanley merged 19 commits into
mainfrom
codex/bilingual-cli
Nov 1, 2026
Merged

daveshanley merged 19 commits into
mainfrom
codex/bilingual-cli

Conversation

@daveshanley

@daveshanley daveshanley commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Use one CLI for OpenAPI and AsyncAPI 3.x across console, summary, JSON, Markdown, HTML, and compact/CI outputs. Parse once, validate the root format, and select doctor's native engine. Reject mixed formats, unsupported AsyncAPI versions, partial models, and unscoped OpenAPI rules used for AsyncAPI.

  • Connect the AsyncAPI explorer with native parent-child and reference edges, stable edge IDs, and reference metadata. Retain removed branches without stale retargeted references. Shared schema edits appear once in the explorer and detail panel; distinct enum edits and raw machine output remain intact.
  • Keep the existing HTML report layout and styles. Native AsyncAPI sections and named object headings replace raw JSONPath headings; nested messages, variables, tags, and examples remain visible. Channels use hash icons, and operations use native send/receive actions. Send badges use pb33f primary blue (--primary-color); receive badges use neon green (--terminal-text), with vertically centered labels and a 0.4em gap in the tree, explorer, and details. Embedded bundles include the corrected palette, spacing, and alignment. Explorer card dimensions follow visible header, child, and extension rows; change-count annotations no longer reserve an empty body row. Header-only cards are compact, and cards with child rows retain the existing dividers. Change-view rows center chevrons, icons, badges and text; extension counts remain right-aligned and annotation badges align with the card edge. SVG wrappers permit selection decorations outside the node layout box, preventing the active border from clipping the badge, arrow, or glow.
  • Load history through revision sources and a two-model batch window. Adjacent revisions reuse models; local and GitHub sibling references stay pinned to the selected revision. Malformed predecessors retain the actual selected baseline. Successful unchanged comparisons remain successful alongside skipped revisions.
  • Distinguish malformed first revisions, no prior comparable version, and no changes. Console rows retain scalar counts after graph eviction and compute unvisited revisions on selection. Local history honors --ext-refs.
  • Support scoped openapiRules, asyncapiRules, and embedded schemaRules, with policy isolation for the full comparison and fresh defaults.
  • Preserve concrete OpenAPI APIs, deduplicated human counts, and raw JSON counts. Add optional format/version metadata. Direct comparisons omit synthetic git labels; HTML retains the raw graph and bounded alias previews.

Dependencies: public releases libopenapi v0.42.0, libasyncapi v0.0.6, Doctor v0.0.86, and Cowboy Components 0.16.0. Cowboy #106 is merged; the npm release identifies merge commit 13819bed. The private Git pin is removed.

CI and npm publication use Node 26.13.0 from .nvmrc; the Docker UI builder uses the matching image tag. The report lockfile includes DOMPurify 3.4.17 and Undici 8.12.3, with explicit consumer overrides for Mermaid, UUID, and KaTeX.

Release integration at 1de1f7e: clean public-registry npm ci, audit, typecheck, all 52 UI tests, both bundle builds, and the full Go suite pass. Bundles rebuilt directly from the npm package are byte-for-byte unchanged. Petstore retains 42/18 and the expected breaking-change exit. All eight hosted checks pass at this exact commit, including Linux Build, Windows Build, report UI, and the five action scenarios.

Validation:

  • Clean installation of Cowboy 0.16.0 from npm; no private Git checkout or locally copied dist required.
  • Full npm audit: zero findings. UI typecheck, all 52 tests, and full/lite bundle builds pass. Rebuilt assets are byte-for-byte unchanged.
  • Full Go suite passes with GOWORK=off. Canonical Petstore summary remains 42 total / 18 breaking; component summary 9/2.
  • Cowboy's released changes passed 940 unit, 48 Chromium, and 3 release-tool tests. Earlier browser checks cover both report formats, native actions, hash icons, compact card geometry, row alignment, and complete selected decorations.
  • Docker build and actual CLI publication were not run. No CLI merge or release was performed.

Related request: vacuum #1015.

@daveshanley
daveshanley marked this pull request as ready for review November 1, 2026 15:57
@daveshanley
daveshanley merged commit a228070 into main Nov 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant