Skip to content

Issue with "not" in geojson schema #566

Closed
@beschoenen

Description

@beschoenen

I'm trying to validate a simple object against the geojson schema but it fails on the "not" in the crs property.

This is the test I wrote, which currently fails.

public function testValidateWithNonExistedPropertyUsingNot()
{
    $schema = json_decode(file_get_contents('http://json.schemastore.org/geojson'), true);
    $data = json_decode('{"type": "FeatureCollection", "features": []}', true);

    $validator = new Validator();
    $validator->validate($data, $schema);

    $this->assertTrue($validator->isValid());
}

It looks like it has something do to with "not" on properties that are not required/present in the data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions