Following review feedback, the generator no longer supports permissive objects.
Reject additionalProperties: true at generation time.
Treat an absent additionalProperties as false, so every object is strict by default and unknown keys are rejected during parsing.
Remove the now-dead permissive-object infrastructure: Kind::Skip, Cat::Skip, kSkip, the per-frame unknown key set, and isStrict().
Update the README feature/rejection tables.
Remove the permissive "loose" object from example.schema.json and the associated tests from test_gen.cpp.
Add Python unit tests verifying the new additionalProperties behavior.
All tests pass (ctest --output-on-failure).
Closes #20
Following review feedback, the generator no longer supports permissive objects.
- Reject `additionalProperties: true` at generation time.
- Treat an absent `additionalProperties` as `false`, so every object is strict by default and unknown keys are rejected during parsing.
- Remove the now-dead permissive-object infrastructure: `Kind::Skip`, `Cat::Skip`, `kSkip`, the per-frame `unknown` key set, and `isStrict()`.
- Update the README feature/rejection tables.
- Remove the permissive "loose" object from `example.schema.json` and the associated tests from `test_gen.cpp`.
- Add Python unit tests verifying the new `additionalProperties` behavior.
All tests pass (`ctest --output-on-failure`).
andrew
requested changes 2026-06-23 17:48:02 +00:00
weaselbot
changed title from schemagen: reject duplicate unknown keys in non-strict objects to schemagen: drop support for additionalProperties: true2026-06-23 18:07:49 +00:00
Track unknown keys in a per-object unordered_set so that permissive
objects (additionalProperties absent/true) still reject duplicate keys,
matching the README guarantee.
- Add std::unordered_set<std::string> to Frame.
- Insert unknown keys in cbKeyData and reject duplicates before skipping.
- Add a permissive "loose" subobject to example.schema.json.
- Test single unknown key accepted and duplicate unknown/known keys rejected.
Following review feedback, the generator no longer supports permissive
objects. Changes:
- Reject `additionalProperties: true` at generation time.
- Treat an absent `additionalProperties` as `false`, so every object is
strict by default and unknown keys are rejected during parsing.
- Remove the now-dead permissive-object infrastructure: `Kind::Skip`,
`Cat::Skip`, `kSkip`, the per-frame `unknown` key set, and `isStrict()`.
- Update the README feature/rejection tables accordingly.
- Remove the permissive "loose" object from example.schema.json and the
associated tests from test_gen.cpp.
- Add Python unit tests verifying the new `additionalProperties` behavior.
All tests pass (`ctest --output-on-failure`).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #20
Following review feedback, the generator no longer supports permissive objects.
additionalProperties: trueat generation time.additionalPropertiesasfalse, so every object is strict by default and unknown keys are rejected during parsing.Kind::Skip,Cat::Skip,kSkip, the per-frameunknownkey set, andisStrict().example.schema.jsonand the associated tests fromtest_gen.cpp.additionalPropertiesbehavior.All tests pass (
ctest --output-on-failure).Drop support for additionalProperties = true
schemagen: reject duplicate unknown keys in non-strict objectsto schemagen: drop support for additionalProperties: true414abca9c0to16f13c241c