@W-23748894 feat(webhooks): show event name instead of URL for OAS 3.1/3.2 webhooks - #101
Draft
alexpmule wants to merge 4 commits into
Draft
@W-23748894 feat(webhooks): show event name instead of URL for OAS 3.1/3.2 webhooks#101alexpmule wants to merge 4 commits into
alexpmule wants to merge 4 commits into
Conversation
Top-level webhooks are not invokable, so api-url renders the event name in place of the request URL/server and suppresses the endpoint path row. 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, so `isWebhook` resolves membership from the model root. The webhook helper is guarded at the package boundary (typeof this._computeWebhooks === 'function') because the shared amf-helper-mixin is versioned independently, mirroring the gRPC fork's optional-method guards in api-navigation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
alexpmule
force-pushed
the
W-23748894-webhooks-clean
branch
from
August 18, 2026 22:17
8d05bc3 to
80e4233
Compare
…nerator to 0.4.0 Bump @api-components/api-model-generator ^0.2.14 -> ^0.4.0 (amf-client-js 5.11 supports OAS 3.1/3.2) and the amf-helper-mixin peer floor ^4.5.31 -> ^4.5.38 (the _computeWebhooks resolver + apiContract.webhooks namespace key only exist in 4.5.38+; below it the feature silently no-ops). Add a real OAS 3.1 webhooks demo spec and register it so prepare generates its model. Make test/amf-loader.js @graph-aware (amf-client-js 5.11 emits flattened @graph models) and rewrite the webhooks test to load the generated model instead of hand-building AMF inline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The webhooks operation view (OAS 3.1) was registered in apis.json but not reachable from the demo: the hardcoded selector list omitted the spec, so the generated model never appeared in the dropdown. Add it as 'OAS 3.1 webhooks' so the event-name rendering can be previewed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@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 (PRW-23748894-webhookson that repo), which resolves top-levelapiContract#webhooksvia an additive fallback.Per-repo behavior:
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.36here. 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)
.actionDOM-absence assertion.apiContract#webhookspredicate would pass GREEN and break prod. A smoke test against a real compact model (at least in nav) is recommended.Scope
Draft for review.