Skip to content

Conversation

@simbo1905
Copy link
Owner

@simbo1905 simbo1905 commented Sep 27, 2025

This PR #87 deletes the json-java21-schema module and adds a complete implementation of JSON Type Definition (JTD) RFC 8927 validator as requested in issue #85. Here's what was accomplished:

🎯 What Was Actually Built (Issue #85)

  • Complete JTD RFC 8927 validator, replacing the deleted JSON Schema module
  • All 8 schema forms implemented: Empty, Ref, Type, Enum, Elements, Properties, Values, Discriminator
  • 423 tests passing: 58 unit + 365 official JTD Test Suite integration tests
  • Full RFC compliance: Leap seconds, strict properties, ref resolution, discriminator exemption
  • Production-ready architecture: Stack-based validation, immutable records, lazy resolution

📊 Scope of Work

  • 15 commits of intensive development
  • 89 files changed: 4,527 insertions, 10,135 deletions
  • Complete module transformation: json-java21-schema → json-java21-jtd
  • Comprehensive documentation: README.md, ARCHITECTURE.md, API docs

🏗️ Key Implementation Files

  • Jtd.java (572 lines) - Main validator with stack-based engine
  • JtdSchema.java (593 lines) - Sealed interface with 8 record implementations
  • JtdSpecIT.java (236 lines) - Official JTD Test Suite integration
  • TestRfc8927.java (440 lines) - Comprehensive RFC compliance tests

✅ All CI Checks Passing

  • Updated test counts in CI.yml (460 tests vs previous 4436)
  • All 4 CI workflows successful
  • Ready for merge to main

simbo1905 and others added 14 commits September 27, 2025 18:06
- Created json-java21-jtd submodule with comprehensive test infrastructure
- Added JtdSpecIT.java running official JTD Test Suite (365 tests total)
- Implemented both validation.json (316 tests) and invalid_schemas.json (49 tests)
- Added DocumentationAJvTests.java with AJV documentation examples
- Created ARCHITECTURE.md with detailed JTD design and RFC 8927 compliance plan
- Set up proper JUL logging following json-java21-schema patterns
- Added comprehensive /// javadoc documentation for test formats
- Configured Maven dependencies and build integration
- All tests currently passing with placeholder validation
- Ready for actual JTD validator implementation

Test execution:
$(command -v mvnd || command -v mvn || command -v ./mvnw) test -pl json-java21-jtd -Dtest=JtdSpecIT

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Simplified the JTD implementation to follow RFC 8927 exactly:

**Removed:**
- Strict/lenient mode complexity (-Djtd.strict system property)
- SKIPPED_TESTS set and conditional test skipping
- Complex metrics with skipped test counting
- Lenient mode logging and failure handling

**Simplified:**
- Single test execution path - all tests must pass
- Clean metrics: total/passed/failed only
- Direct test failure reporting without mode conditions
- Architecture docs updated to remove strict/lenient references

**What remains:**
- Official JTD Test Suite (365 tests): validation.json + invalid_schemas.json
- RFC-compliant error format: instancePath + schemaPath
- Single command: $(command -v mvnd || command -v mvn || command -v ./mvnw) test -pl json-java21-jtd -Dtest=JtdSpecIT
- Comprehensive /// javadoc documentation

This follows the RFC specification without additional complexity.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
… tests passing

- Created JtdSchema sealed interface with eight RFC 8927 schema forms
- Implemented JtdValidator with proper JUL logging at INFO/FINE levels
- Updated JtdSpecIT to use actual validation instead of placeholder
- Added ValidationResult and ValidationError classes following DOP patterns
- 345 out of 365 JTD spec tests now pass (95% success rate)
- Tests show proper INFO level execution logging per AGENTS.md requirements

The implementation covers all eight JTD forms:
- Empty, Ref, Type, Enum, Elements, Properties, Values, Discriminator
- Proper nullable support and mutually-exclusive form validation
- Simple validation logic following JSON Schema patterns but much simpler

To test: /opt/homebrew/bin/mvnd -pl json-java21-jtd test -Djava.util.logging.ConsoleHandler.level=INFO
… documentation

- Removed all references to deleted json-java21-schema module from AGENTS.md
- Updated top-level README.md to mention JTD validator instead of JSON Schema validator
- Created comprehensive README.md in json-java21-jtd/ with user documentation
- Updated ARCHITECTURE.md to remove json-java21-schema references
- All JTD RFC 8927 compliance tests are passing
@openhands-ai
Copy link

openhands-ai bot commented Sep 27, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • CI
    • CI

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #87 at branch `feature/jtd-rfc8927-implementation`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Updated expected test counts from 4436 tests/1692 skipped to 460 tests/0 skipped
after removing the json-java21-schema module and adding json-java21-jtd module.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@simbo1905 simbo1905 changed the title Documentation cleanup: Remove json-java21-schema references, add JTD documentation Implement JSON Type Definition (JTD) RFC 8927 validator with full compliance (Closes #85) Sep 27, 2025
@simbo1905 simbo1905 merged commit 8dec57f into main Sep 27, 2025
4 checks passed
@simbo1905 simbo1905 deleted the feature/jtd-rfc8927-implementation branch September 27, 2025 23:00
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