Skip to content

Complete error message format consistency - add quotes to property names #105

Description

@simbo1905

Issue: Complete error message format consistency

Location: json-java21-jtd/src/main/java/json/java21/jtd/Jtd.java

Current Status: ✅ COMPLETED

Changes Made:

  • MISSING_REQUIRED_PROPERTY: 'missing required property: %s' → 'missing required property: '%s''
  • ADDITIONAL_PROPERTY_NOT_ALLOWED: 'additional property not allowed: %s' → 'additional property not allowed: '%s''

Pattern Established:

  • User-provided string values (type names, property names, enum values, discriminator values) get single quotes
  • JSON class names (JsonNumber, JsonString, etc.) and type keywords (boolean, string, etc.) do NOT get quotes
  • This matches the existing pattern used by VALUE_NOT_IN_ENUM, DISCRIMINATOR_MUST_BE_STRING, etc.

Result:
✅ All tests pass. Error message format is now consistent across the codebase.

This issue is now resolved.

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