pyhf icon indicating copy to clipboard operation
pyhf copied to clipboard

Update validator for jsonschema

Open matthewfeickert opened this issue 3 years ago • 1 comments

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

matthewfeickert avatar Sep 02 '22 19:09 matthewfeickert

This is #1978

kratsg avatar Sep 02 '22 19:09 kratsg