karenetheridge / JSON-Schema-Modern

Validate data against a schema using a JSON Schema
https://metacpan.org/release/JSON-Schema-Modern/
Other
10 stars 1 forks source link

support "stringy booleans", for some types of data only #83

Open karenetheridge opened 8 months ago

karenetheridge commented 8 months ago

For some payloads, e.g. query parameters that are exploded into an object from a string, a value might convey a boolean value but was represented as a string. Provide an option to allow strings that match true or false to be validated as a boolean value:

When this configuration is enabled (default false),

data "false" and "true" will validate successfully against

karenetheridge commented 8 months ago

meh? YAGNI? why can't we just say "enum":["true","false"] instead, because the range of values for booleans is so limited?