pyhf
pyhf copied to clipboard
Update validator for jsonschema
It seems that the issue is because of the fact that in the custom schema, we have
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "1.1.0/workspace.json",
"$ref": "defs.json#/definitions/workspace"
}
which is set with base_uri = path/to/custom_schemas/1.1.0 in #1976 . Since there's a $ref and an $id - the $id is being used to add a 1.1.0 to the base_uri when it shouldn't be. So yes, this is a bug in jsonschema that was resolved in 4.15.0.
We could update this to a newer draft for the validator, and this issue won't occur.
Originally posted by @kratsg in https://github.com/scikit-hep/pyhf/issues/1979#issuecomment-1235827429
This is #1978