Closed m-mohr closed 2 years ago
@m-mohr I'm not able to reproduce this on PySTAC v1.4.0 and jsonschema v4.6.0. Could you post your jsonschema version and an example script that shows how you are running the validation?
Here is what I get with the example above saved at ./test-validation-error.json
:
>>> from pystac.validation import validate_dict
>>> import json
>>> with open("./test-validation-error.json") as src:
... coll_dict = json.load(src)
...
>>> validate_dict(coll_dict)
['https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json', 'https://stac-extensions.github.io/scientific/v1.0.0/schema.json', 'https://stac-extensions.github.io/processing/v1.1.0/schema.json', 'https://stac-extensions.github.io/table/v1.2.0/schema.json', 'https://stac-extensions.github.io/item-assets/v1.0.0/schema.json']
Ah, good call. I was on jsonschema 3.2.0 and updating it to the latest version fixed it. Not sure how that happened. Sorry for the noise.
We currently require jsonschema >= 3.0.0, so the version you had installed was valid. I’m going to reopen this so we can change that dependency to be sure we avoid this issue.
Ah, I thought I had seen a 4.x requirement somewhere, but then it's indeed a good idea to update.
When I run validation for items or collections with the processing extension being added to the JSON files, I get an error that says it can't resolve a JSON pointer. I'm on PySTAC 1.4.0.
I'm repoprting this here, as stac-node-validator doesn't have this issue so I assume the JSON Schema is correct (also, it looks correct to me).
Error:
jsonschema.exceptions.RefResolutionError: Unresolvable JSON pointer: 'definitions/require_any_field'
Example JSON: