json-schema: Changing the resolution base via 'id' does not work properly
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.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 15
Commits related to this issue
- Add proper recursive handling for $ref resolution base Fixes #447 Note that this patch does not check whether a given container is actually a schema when recursing into it. In most cases this will n... — committed to erayd/json-schema by erayd 7 years ago
- Add proper recursive handling for $ref resolution base Fixes #447 Note that this patch does not check whether a given container is actually a schema when recursing into it. In most cases this will n... — committed to erayd/json-schema by erayd 7 years ago
- Add proper recursive handling for $ref resolution base Fixes #447 Note that this patch does not check whether a given container is actually a schema when recursing into it. In most cases this will n... — committed to erayd/json-schema by erayd 7 years ago
- Add proper recursive handling for $ref resolution base Fixes #447 Note that this patch does not check whether a given container is actually a schema when recursing into it. In most cases this will n... — committed to erayd/json-schema by erayd 7 years ago
- Add proper recursive handling for $ref resolution base (#448) Fixes #447 Note that this patch does not check whether a given container is actually a schema when recursing into it. In most cases t... — committed to justinrainbow/json-schema by erayd 7 years ago
- Add proper recursive handling for $ref resolution base (#448) Fixes #447 Note that this patch does not check whether a given container is actually a schema when recursing into it. In most cases t... — committed to erayd/json-schema by erayd 7 years ago
- Backports for 5.2.2 (Part 3) (#450) * Update php-csfixer rules to address problem in 2.7 & new multiline rule (#449) * Update php-csfixer rules to address problem in 2.7 & new multiline rule *... — committed to justinrainbow/json-schema by erayd 7 years ago
@mdeboer See #448. Assuming code review is OK, I will backport this fix to 5.x.x after merge.