docs(asm): add OpenAPI 3.1 webhooks section for scan status events#21
Open
dmchaledev wants to merge 1 commit into
Open
docs(asm): add OpenAPI 3.1 webhooks section for scan status events#21dmchaledev wants to merge 1 commit into
dmchaledev wants to merge 1 commit into
Conversation
The POST /scans description mentions subscribing to webhooks to track async scan completion, but no webhook payload was documented anywhere. This adds a first-class `webhooks:` section (native to OpenAPI 3.1) covering scan.completed, scan.failed, and scan.cancelled events, including HMAC-SHA256 signature verification guidance and full request body examples. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECLzW74k3Uct8QrnxnwfWH
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.
Summary
POST /scanstells callers to "subscribe to webhooks to track completion" but the spec had zero webhook payload documentation — a dead end for any developer building event-driven automation.webhooks:section (natively supported in OpenAPI 3.1) covering the three terminal scan events:scan.completed,scan.failed, andscan.cancelled.ScanDetailschema, so consumers get asset counts and vulnerability-by-severity breakdowns without a follow-up API call.What changed
asm/openapi.yaml— added a top-levelwebhooks:block (~100 lines):scan.completed,scan.failed,scan.cancelledScanDetail— no new schemas neededX-HailBytes-Signature-256verification snippetTest plan
spectral lint asm/openapi.yaml --ruleset spectral:oaspasses (CI validates this)ScanDetail$refin the webhook request body resolves correctly in any OpenAPI tooling (Postman, Swagger UI, etc.)🤖 Generated with Claude Code
https://claude.ai/code/session_01ECLzW74k3Uct8QrnxnwfWH
Generated by Claude Code