You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Simplify enum deduplication logic in JtdPropertyTest #104
Issue #99: Enforce RFC 8927 semantics for {} schema and remove AJV compatibility
Problem
Current codebase contains legacy AJV/JSON Schema compatibility where {} could mean "accept anything".
This contradicts RFC 8927: {} always means an object with no properties allowed
(properties = {}, optionalProperties = {}, additionalProperties = false).
This dual behavior causes complexity and test contradictions.
Goals
Rip out all AJV-style "compatibility mode" handling (fromRef, EmptySchema fallback).
Make {} always RFC 8927 strict (PropertiesSchema with no properties, no additionalProperties).
Add an INFO log warning whenever {} is compiled to help developers spot semantic differences from AJV/JSON Schema.
Rewrite AJV-derived tests to expect failures or exceptions under RFC mode.
Update README.md and AGENTS.md to document the difference.
Implementation Notes
Follow Markdown-Driven-Development: update documentation before code
Add INFO-level logging when {} schema is compiled
Ensure all tests validate strict RFC 8927 behavior
Update user-facing documentation to explain the semantic difference
Analysis of Current State (main branch after PR #117 merge)
Issue Body Mismatch ⚠️
Note: The issue body appears to contain copy-paste content from issue #99 about RFC 8927 semantics. This analysis addresses the title: "Simplify enum deduplication logic in JtdPropertyTest".
More efficient: Uniqueness enforced at generation time, not post-processing
Idiomatic jqwik: Uses the library's built-in uniqueness constraint
Better shrinking: Works better with jqwik's shrinking algorithm
Scope
This is a small, isolated change affecting only the private enumSchemaArbitrary() helper method. No other tests affected.
Clarification Needed
Please confirm if this issue is only about the enum deduplication simplification (per the title), or if the RFC 8927 content in the body is also intended to be addressed here.
Activity
simbo1905 commentedon Jan 26, 2026
Analysis of Current State (main branch after PR #117 merge)
Issue Body Mismatch⚠️
Note: The issue body appears to contain copy-paste content from issue #99 about RFC 8927 semantics. This analysis addresses the title: "Simplify enum deduplication logic in JtdPropertyTest".
Current Implementation
File:
json-java21-jtd/src/test/java/json/java21/jtd/JtdPropertyTest.java(lines 263-269)Problem
The current approach:
stream().distinct()to remove themSuggested Fix
jqwik provides
ListArbitrary.uniqueElements()which generates unique elements at generation time:Benefits
Scope
This is a small, isolated change affecting only the private
enumSchemaArbitrary()helper method. No other tests affected.Clarification Needed
Please confirm if this issue is only about the enum deduplication simplification (per the title), or if the RFC 8927 content in the body is also intended to be addressed here.