Skip to content

feat: modern JSON Schema support — $defs, dependentSchemas, dependentRequired (C37) - #1181

Merged
jsenko merged 3 commits into
feature/json-schema-rewrite-cleanfrom
c37-modern-keywords
Aug 10, 2026
Merged

feat: modern JSON Schema support — $defs, dependentSchemas, dependentRequired (C37)#1181
jsenko merged 3 commits into
feature/json-schema-rewrite-cleanfrom
c37-modern-keywords

Conversation

@jsenko

@jsenko jsenko commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Normalize d4-d7 dependencies into dependentSchemas + dependentRequired during compound conversion
  • D4/D6/D7 converters split dependencies via CompoundSchemaConverter.splitDependencies
  • diffFullSchemaDependentSchemas: key tracking + compatibility-aware schema comparison
  • diffFullSchemaDependentRequired: key tracking + string-array set comparison
  • $defs: handled by auto-recursion (same pattern as definitions)
  • Remove flagModernVersions — 2019-09/2020-12 no longer flagged as unsupported
  • 8 new test cases (modern keywords + cross-version d7↔2019-09)

Context

C37 in #1042. First step of modern JSON Schema version support.

Test plan

  • All 155 CC data-driven tests pass (147 existing + 8 new)
  • 8 dereferencer tests pass

jsenko added 3 commits August 10, 2026 15:32
…Required (C37)

Normalize d4-d7 dependencies into dependentSchemas + dependentRequired
during compound conversion. All versions now use the same compound
fields for comparison.

- D4/D6/D7 converters split dependencies (schema→dependentSchemas,
  string-array→dependentRequired) via CompoundSchemaConverter.splitDependencies
- CompoundSchemaDiffVisitor: add diffFullSchemaDependentRequired and
  diffFullSchemaDependentSchemas with key tracking
- visitFullSchemaDependentSchema: compatibility-aware schema comparison
- Remove flagModernVersions — 2019-09/2020-12 no longer flagged as unsupported
- $defs: handled by auto-recursion (same as definitions)
8 new test cases:
- $defs basic compatibility (2019-09)
- dependentSchemas add/remove (2019-09)
- dependentRequired add/remove members (2019-09)
- Cross-version: d7 dependencies vs 2019-09 dependentSchemas
- Cross-version: d7 dependencies (string-array) vs 2019-09 dependentRequired
- 2019-09 and 2020-12 basic schema compatibility
@jsenko
jsenko merged commit 2e31771 into feature/json-schema-rewrite-clean Aug 10, 2026
2 checks passed
@jsenko
jsenko deleted the c37-modern-keywords branch August 10, 2026 13:53
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.

1 participant