Skip to content

@W-23748894 feat(webhooks): render OAS 3.1/3.2 top-level webhooks in a dedicated section - #82

Draft
alexpmule wants to merge 1 commit into
mainfrom
W-23748894-webhooks
Draft

@W-23748894 feat(webhooks): render OAS 3.1/3.2 top-level webhooks in a dedicated section#82
alexpmule wants to merge 1 commit into
mainfrom
W-23748894-webhooks

Conversation

@alexpmule

Copy link
Copy Markdown
Contributor

@W-23748894

What

Renders OAS 3.1/3.2 top-level webhooks as first-class documentation.

Part of the webhooks feature for TD-0333486. Depends on @api-components/amf-helper-mixin >= 4.5.36 (PR W-23748894-webhooks on that repo), which resolves top-level apiContract#webhooks via an additive fallback.

Per-repo behavior:

  • api-navigation — dedicated "Webhooks" nav section.
  • api-method-documentation — shows the webhook event name instead of a URL.
  • api-documentation — suppresses the per-operation Try-It for webhooks (webhooks are event-driven; there is nothing to invoke).

Why

Webhooks are top-level in OAS 3.1/3.2 (not under paths). AC4: webhooks must render as their own first-class section with Try-It suppressed.

Dependency / publish gate

Ship the mixin (4.5.36) first, then raise the peer floor to ^4.5.36 here. Below 4.5.36 the resolver fallback does not exist and the feature silently no-ops with no error/log/metric.

Tests

Green in chromium + firefox. Inline AMF expanded-model fixtures.

Known QA notes (P2, non-blocking, tracked for the PR discussion)

  • AC-03 is proven in two halves (mixin suite proves resolution on 4.5.36 source; this suite proves suppression on the installed mixin) — no single end-to-end select→resolve→render→no-Try-It test, and no .action DOM-absence assertion.
  • No test consumes the real generated model; a future generator change to the apiContract#webhooks predicate would pass GREEN and break prod. A smoke test against a real compact model (at least in nav) is recommended.

Scope

Draft for review.

…section

Top-level webhooks (OAS 3.1/3.2) now render in their own "Webhooks" nav
section, sibling to "Endpoints". A webhook compiles to an apiContract#EndPoint
node identical to a regular endpoint; the only distinction is the WebAPI root
references it via apiContract#webhooks. _traverseWebhooks routes those nodes
into a distinct `webhooks` collection via a collectionKey param on
_appendEndpointItem, so they never leak into the Endpoints list. The label
defaults to the event name (path, renderPath=false) since a webhook has no
core#name. Query filtering is shared with endpoints via _filterEndpointItems.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexpmule
alexpmule force-pushed the W-23748894-webhooks branch from eebe3aa to 1176ee4 Compare August 18, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant