Skip to content

Simplify enum deduplication logic in JtdPropertyTest #104

Description

@simbo1905

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

  1. Rip out all AJV-style "compatibility mode" handling (fromRef, EmptySchema fallback).
  2. Make {} always RFC 8927 strict (PropertiesSchema with no properties, no additionalProperties).
  3. Add an INFO log warning whenever {} is compiled to help developers spot semantic differences from AJV/JSON Schema.
  4. Rewrite AJV-derived tests to expect failures or exceptions under RFC mode.
  5. 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

EOF < /dev/null

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions