Closed mpalmer closed 7 months ago
I think your problem is that YAML
parses "on"
into true
:
repos/json_schemer main % bin/console -r yaml --simple-prompt
>> document_url = "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/test/github-workflow/1162.yaml"
>> YAML.load(Net::HTTP.get(URI(document_url))).keys
=> ["name", true, "jobs"]
(Thank you, BTW)
I'm trying to use
json_schemer
to validate documents (github workflow files) against the [SchemaStore project]'s github-workflow schema. However, no matter what (valid-seeming) document I validate, I'm getting very odd errors. Here's a minimal example script that exhibits the problem:I would expect the document to validate, but instead the script prints out these errors:
I feel like the schema is probably OK (it works in SchemaStore's testsuite, which I believe uses AJV, and it works in the
valico
Rust crate), but I can't imagine thatjson_schemer
has any huge showstopper bugs either, so I feel like it must be PEBKAC, but for the life of me I can't see what I'm doing wrong. Am I just really (un)lucky, and I've stumbled across a deeply-hidden bug somewhere, or have I made a really embarrassing clanger in my usage ofjson_schemer
?