Skip to content

feat: add Spectral JSONPath compatibility dialect with evaluator - #7

Merged
daveshanley merged 1 commit into
mainfrom
vacuum-932
Jul 21, 2026
Merged

feat: add Spectral JSONPath compatibility dialect with evaluator #7
daveshanley merged 1 commit into
mainfrom
vacuum-932

Conversation

@daveshanley

Copy link
Copy Markdown
Member

Introduce an opt-in Spectral compatibility mode (config.WithSpectralCompatibility) that evaluates JavaScript-style filter expressions used by Spectral rulesets — method calls like .match()/.indexOf(), regex literals, and standalone @Property truthiness — while preserving RFC 9535 and JSONPath Plus behavior.

  • Add spectral_expr.go and spectral_eval.go implementing the compatibility grammar and runtime evaluator
  • Wire the dialect through config, parser, filter, selector, segment, and token handling
  • Add conformance corpus, official Spectral parity fixtures, fuzz tests, and benchmarks under testdata/spectral, with generator scripts for collecting public ruleset selectors
  • Pinned public-ruleset inventory covers 51 deduplicated selectors at 100% compile and round-trip compatibility
  • Update README with the new dialect documentation

daveshanley/vacuum#936

…conformance corpus

Introduce an opt-in Spectral compatibility mode (config.WithSpectralCompatibility) that evaluates JavaScript-style filter expressions used by Spectral rulesets — method calls like .match()/.indexOf(), regex literals, and standalone @Property truthiness — while preserving RFC 9535 and JSONPath Plus behavior.

- Add spectral_expr.go and spectral_eval.go implementing the compatibility grammar and runtime evaluator
- Wire the dialect through config, parser, filter, selector, segment, and token handling
- Add conformance corpus, official Spectral parity fixtures, fuzz tests, and benchmarks under testdata/spectral, with generator scripts for collecting public ruleset selectors
- Pinned public-ruleset inventory covers 51 deduplicated selectors at 100% compile and round-trip compatibility
- Update README with the new dialect documentation
@daveshanley
daveshanley merged commit c93a4f8 into main Jul 21, 2026
5 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