Validates SPDX 3 documents
While standalone tools like pyshacl and check-jsonschema can be used to
validate SPDX 3 documents, there are a few context-aware checks that can be
useful. This includes:
- Ignored SHACL errors for missing
spdxIds if they are defined in anExternalMap - Validation that any
spdxIddefined in anExternalMapare not present in the document - SHACL Validation of merged documents (in this way, if you reference an
spdxIdfrom anExternalMapand then pass the document that provides thatspdxId, the type can be validated) - (Hopefully) More useful JSON schema error output
spdx3-validate can be installed using pip:
python3 -m pip install spdx3-validateDeveloping on spdx3-validate is best done using a virtual environment. You
can configure one and install spdx3-validate in editable mode with all
necessary development dependencies by running:
python3 -m venv .venv
. .venv/bin/activate
pip install -e ".[dev]"- Option to automatically download dependencies based on
locationHint - Offline validation?