Skip to content

fix(asm): drop null example literals crashing Spectral lint#50

Merged
dmchaledev merged 1 commit into
mainfrom
fix/webhook-null-examples
Jul 19, 2026
Merged

fix(asm): drop null example literals crashing Spectral lint#50
dmchaledev merged 1 commit into
mainfrom
fix/webhook-null-examples

Conversation

@dmchaledev

Copy link
Copy Markdown
Contributor

Summary

While merging the open-PR backlog, the scan.failed webhook example (from #21) landed with label: null and completed_at: null under the OAS 3.1 array-form nullable schema (type: [string, 'null'], from the earlier nullable-fix merge). Spectral (spectral-cli 6.16.0, as pinned in CI) throws Cannot read properties of null (reading 'enum') on that specific combination — a real lint crash, not a false positive.

Both fields are optional and nullable, so omitting them from the example is equally valid and avoids the crash. Verified spectral lint asm/openapi.yaml --ruleset .spectral.yaml --fail-severity error now passes cleanly.

Test plan

  • spectral lint asm/openapi.yaml --ruleset .spectral.yaml --fail-severity error → 0 errors
  • YAML still parses correctly

🤖 Generated with Claude Code


Generated by Claude Code

The scan.failed webhook example (merged in #21) included `label: null`
and `completed_at: null` under the OAS 3.1 array-form nullable schema
introduced earlier — Spectral (spectral-cli 6.16.0, as pinned) throws
"Cannot read properties of null (reading 'enum')" on that combination.
Both fields are optional/nullable, so omitting them is equally valid.
@dmchaledev
dmchaledev merged commit faedd5a into main Jul 19, 2026
2 checks passed
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.

2 participants