Skip to content

Changing the resolution base via 'id' does not work properly #447

Closed
@erayd

Description

@erayd

Per issue #446. See below test case:

$data = json_decode(<<<'eot'
{
    "propertyOne": "blue"
}
eot
);

$base = json_decode(<<<'eot'
{
    "id": "schema.json",
    "properties": {
        "propertyOne": {
            "$ref": "propertyOne.json"
        }
    }
}
eot
);

$validator = new \JsonSchema\Validator();
var_dump($validator->validate($data, $base));

@bighappyface Could you please mark this as blocking for 6.0.0? I need to stare at the code some more, but at first look this may require significant refactoring of the $ref code.

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