Skip to content

test: add real-world JSON schema pattern tests#412

Merged
jonluca merged 1 commit intomainfrom
jonluca/add-real-world-tests
Feb 28, 2026
Merged

test: add real-world JSON schema pattern tests#412
jonluca merged 1 commit intomainfrom
jonluca/add-real-world-tests

Conversation

@jonluca
Copy link
Member

@jonluca jonluca commented Feb 28, 2026

Summary

Adds 58 comprehensive tests covering real-world JSON Schema patterns found in production systems:

  • OpenAPI 3.0 patterns: allOf/oneOf/anyOf composition, discriminators, extended $refs
  • Recursive structures: linked lists, trees, graphs, mutual circular references
  • JSON Schema Draft 7 features: if/then/else, $defs, patternProperties, additionalProperties
  • Complex composition: diamond inheritance, Kubernetes-style deep nesting, large flat schemas
  • Edge cases & options: mutateInputSchema, excludedPathMatcher, callbacks, special characters

Test Coverage

Tests validate parse, resolve, bundle, and dereference operations across diverse schema patterns. All 58 tests pass alongside the existing 298 test suite (356 total tests).

References

Patterns sourced from OpenAPI 3.0+ specs, Kubernetes manifests, GraphQL introspection schemas, and common configuration file formats (VS Code settings, ESLint configs).

Add 58 new tests across 5 test suites covering common JSON Schema patterns found in production:
- OpenAPI 3.0 patterns (allOf, oneOf, anyOf composition, extended $refs)
- Recursive data structures (linked lists, trees, graphs, AST patterns)
- JSON Schema Draft 7 advanced features (if/then/else, $defs, patternProperties)
- Complex schema composition (diamond patterns, Kubernetes-style deep nesting)
- Edge cases and options (mutateInputSchema, excludedPathMatcher, callbacks)

All tests pass. Coverage includes real-world patterns from OpenAPI specs, Kubernetes
definitions, GraphQL schemas, and configuration file patterns like VS Code settings.
@jonluca jonluca enabled auto-merge (squash) February 28, 2026 18:45
@coveralls
Copy link

Pull Request Test Coverage Report for Build 22526716340

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.701%

Totals Coverage Status
Change from base Build 22526630049: 0.0%
Covered Lines: 999
Relevant Lines: 1118

💛 - Coveralls

@jonluca jonluca disabled auto-merge February 28, 2026 18:47
@jonluca jonluca merged commit 5d4592f into main Feb 28, 2026
13 checks passed
@jonluca jonluca deleted the jonluca/add-real-world-tests branch February 28, 2026 18:47
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