I added a setting permissive_pattern_properties in both the library and CLI which allows setting objects with patternProperties as discussed in #635 to generate as maps (previously, they silently generated as empty structs).
This is a toggle instead of a default because it will result in a translated specification which accepts object keys which violate the pattern. I didn't explore adding a way to validate keys with deserialize_with but this may be desired as a future improvement to this.
BTW, tested the generated code after this change and it's able to parse the C++ tree-sitter grammar.json now!
I added a setting
permissive_pattern_properties
in both the library and CLI which allows setting objects withpatternProperties
as discussed in #635 to generate as maps (previously, they silently generated as empty structs).This is a toggle instead of a default because it will result in a translated specification which accepts object keys which violate the pattern. I didn't explore adding a way to validate keys with
deserialize_with
but this may be desired as a future improvement to this.BTW, tested the generated code after this change and it's able to parse the C++ tree-sitter
grammar.json
now!