IBM / jsonsubschema

Tool for checking whether a JSON schema is a subschema of another JSON schema.
Apache License 2.0
82 stars 17 forks source link

Fix regex metacharacters in enums #26

Closed michaelmior closed 4 weeks ago

michaelmior commented 1 month ago

When string enums contains regular expression meta characters such as ^ they are not properly escaped, which can cause canonicalization to produce incorrect results. This fix may not be perfect since Python does not use ECMA 262 syntax for regular expressions as in JSON Schema.