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
Complete error message format consistency - add quotes to property names #105
changed the title [-]Simplify enum deduplication logic in JtdPropertyTest[/-][+]Complete error message format consistency - add quotes to property names[/+]on Sep 28, 2025
Analysis of Current State (main branch after PR #117 merge)
Finding: Issue Appears Already Completed ✅
Looking at the current code in json-java21-jtd/src/main/java/json/java21/jtd/Jtd.java (lines 745-786), the error messages already follow the consistent pattern described in this issue:
Error messages WITH single quotes around user-provided values:
Error Type
Template
UNKNOWN_TYPE
"unknown type: '%s'"
VALUE_NOT_IN_ENUM
"value '%s' not in enum: %s"
MISSING_REQUIRED_PROPERTY
"missing required property: '%s'"
ADDITIONAL_PROPERTY_NOT_ALLOWED
"additional property not allowed: '%s'"
DISCRIMINATOR_MUST_BE_STRING
"discriminator '%s' must be a string"
DISCRIMINATOR_VALUE_NOT_IN_MAPPING
"discriminator value '%s' not in mapping"
Error messages WITHOUT quotes (correct - these report Java class names/keywords, not user values):
Error Type
Template
EXPECTED_BOOLEAN
"expected boolean, got %s"
EXPECTED_STRING
"expected string, got %s"
etc.
Test Coverage Verified
Tests in TestValidationErrors.java confirm the quoted format:
Line 151: assertThat(...).contains("missing required property: 'age'");
Line 173: assertThat(...).contains("additional property not allowed: 'extra'");
Recommendation
This issue can be closed - the changes described in the issue body are already implemented in the current main branch. The pattern is consistent: user-provided values (property names, type names, enum values) get single quotes, while Java type keywords don't.
Activity
[-]Simplify enum deduplication logic in JtdPropertyTest[/-][+]Complete error message format consistency - add quotes to property names[/+]simbo1905 commentedon Jan 26, 2026
Analysis of Current State (main branch after PR #117 merge)
Finding: Issue Appears Already Completed ✅
Looking at the current code in
json-java21-jtd/src/main/java/json/java21/jtd/Jtd.java(lines 745-786), the error messages already follow the consistent pattern described in this issue:Error messages WITH single quotes around user-provided values:
UNKNOWN_TYPE"unknown type: '%s'"VALUE_NOT_IN_ENUM"value '%s' not in enum: %s"MISSING_REQUIRED_PROPERTY"missing required property: '%s'"ADDITIONAL_PROPERTY_NOT_ALLOWED"additional property not allowed: '%s'"DISCRIMINATOR_MUST_BE_STRING"discriminator '%s' must be a string"DISCRIMINATOR_VALUE_NOT_IN_MAPPING"discriminator value '%s' not in mapping"Error messages WITHOUT quotes (correct - these report Java class names/keywords, not user values):
EXPECTED_BOOLEAN"expected boolean, got %s"EXPECTED_STRING"expected string, got %s"Test Coverage Verified
Tests in
TestValidationErrors.javaconfirm the quoted format:assertThat(...).contains("missing required property: 'age'");assertThat(...).contains("additional property not allowed: 'extra'");Recommendation
This issue can be closed - the changes described in the issue body are already implemented in the current main branch. The pattern is consistent: user-provided values (property names, type names, enum values) get single quotes, while Java type keywords don't.