Data Validator is available as Docker image at GitHub registry.
The configuration bellow runs the validator with every push and pull request.
Create an action file (e.g. .github/workflows/data-validator.yml
) with following content:
name: Validate data files
on:
push:
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Data validator
uses: datagov-cz/data-validator/github@v2
with:
configuration: file://./.github/workflows/validate-syntax.ttl
Part of the configuration is path to configuration file (.github/workflows/validate-syntax.ttl
).
Please see section [Configuring the validation] for more information about this file.
Data Validator utilize RDF-based configuration to configure the validation process.
See documentation/example-configurations.md
file for examples of Data Validator configurations.
Check that file can be loaded as JSON-LD file with Titanium JSON-LD.
Using Jena loads the file and check it is not empty.
Check that file can be loaded as JSON using Jackson.
Check that file can be loaded as RDF file using Jena.
- Validator fails to detect space between literal and language tag.
Check that file can be loaded as RDF file using Eclipse RDF4J.
Check that file can be loaded as XML file using Dom4j.
Validate JSON file using JSON Schema Validator.
- urn:schema : Path to JSON-Schema file.
Validate XML document using dom4j and Apache Xerces2.
- urn:schemaUrl : Path to schema file.
- Apache Xerces2 does not fully support XML Schema 1.1.
Using Jena loads RDF content and check compliance with given SHACL shape.
- urn:shaclUrl : Path to file with SHACL.
Tento repozitář je udržován v rámci projektu OPZ č. CZ.03.4.74/0.0/0.0/15_025/0004172.