@oslo-flanders/jsonld-validator
v3.0.2
Published
Validates the generated JSON-LD file to a set of validation rules
Downloads
551
Readme
OSLO JSON-LD Validator
Validates JSON-LD files against a whitelist of allowed namespaces/URIs
This package validates that all URIs in a JSON-LD file match allowed namespace prefixes from a whitelist file. It helps ensure that only approved vocabularies and namespaces are used in your OSLO model.
Install
npm install @oslo-flanders/jsonld-validator
Global install
npm install -g @oslo-flanders/jsonld-validator
API
| Parameter | Description | Required | Possible values |
| -------------------------- | --------------------------------------------------------------------------------------- | ------------------ | ---------------------------------- |
| --input | The URL or local file path of an OSLO JSON-LD file | :heavy_check_mark: | |
| --whitelist | The URL or local file path to a whitelist json containing a set of allowed URI prefixes | :heavy_check_mark: | whitelist.json |
| --publicationEnvironment | The base URI of environment where the document will be published. | :heavy_check_mark: | https://data.vlaanderen.be |
| --language | The language in which intermediary format is generated. | :heavy_check_mark: | nl, fr, en, es |
| --specificationType | The type of specification being validated. | :heavy_check_mark: | ApplicationProfile, Vocabulary |
Usage
oslo-jsonld-validator --input report.jsonld --whitelist whitelist.json --language nl --publicationEnvironment https://data.vlaanderen.be --specificationType Vocabulary
oslo-jsonld-validator --input report.jsonld --whitelist https://raw.githubusercontent.com/Informatievlaanderen/OSLO-UML-Transformer/refs/heads/configuration/whitelist.json --language nl --publicationEnvironment https://data.vlaanderen.be --specificationType ApplicationProfile