Closed
Description
I just noticed that the Validator
class does not appear to support the const
keyword as specified in section 6.1.3 of the spec. Is this intentional?
Given a few pointers where to start, I'd also be prepared to open a PR to add support for this feature.
$schema = [
"properties" => [
"foo" => [
"type" => "string",
"const" => "foo"
]
]
];
$doc = ["foo" => "bar"];
$validator = new JsonSchema\Validator();
$validator->validate($doc, $schema);
// expected: false, actual: true
var_dump($validator->isValid());
Metadata
Metadata
Assignees
Labels
No labels