hack-json-schema icon indicating copy to clipboard operation
hack-json-schema copied to clipboard

Handle `null` being provided to `type` when we do an optimized `anyOf` check

Open mwildehahn opened this issue 5 years ago • 0 comments

We try and optimize anyOf checks for types that all have a specific string field that acts like an enum. This optimized check isn't handling if that provided value is given as null here: https://github.com/slackhq/hack-json-schema/blob/04b77eaf4740d7e51f672ff70820e1e27fec1307/src/Codegen/Constraints/UntypedBuilder.php#L433.

mwildehahn avatar Feb 10 '20 20:02 mwildehahn