Commit 2c93ff8
authored
Fix additionalProperties default value in JTD validator (#92)
* Issue #91 Fix additionalProperties default value in JTD validator
- Fixed JTD validator to correctly default additionalProperties to false when no properties are defined
- Added test case testAdditionalPropertiesDefaultsToFalse() to verify the fix
- Updated CI test count from 463 to 464 to account for new test
- This ensures RFC 8927 compliance where empty properties schemas reject additional properties by default
The bug was in Jtd.java line 446 where additionalProperties was set to true instead of false
when both properties and optionalProperties were empty. This caused empty schemas to incorrectly
allow additional properties instead of rejecting them by default.
Closes #911 parent ced2da9 commit 2c93ff8
File tree
4 files changed
+499
-3
lines changed- .github/workflows
- json-java21-jtd/src
- main/java/json/java21/jtd
- test/java/json/java21/jtd
4 files changed
+499
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
446 | | - | |
| 445 | + | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| |||
0 commit comments