diff --git a/.github/workflows/integrity_check.py b/.github/workflows/integrity_check.py index 04b16d3..5f6c2dc 100755 --- a/.github/workflows/integrity_check.py +++ b/.github/workflows/integrity_check.py @@ -1,9 +1,14 @@ import json import os import logging +import yaml from jsonschema import validators, validate -with open("schema.json", "r") as f: +with open("schema.yml", "r") as f: + data = yaml.safe_load(f) +schema_path = data['schemas'][0]['path'] + +with open(schema_path, "r") as f: schema_data = json.load(f) validators.validator_for(schema_data).check_schema(schema_data) diff --git a/schema.json b/product.json similarity index 100% rename from schema.json rename to product.json diff --git a/schema.yml b/schema.yml new file mode 100755 index 0000000..1ce7803 --- /dev/null +++ b/schema.yml @@ -0,0 +1,8 @@ +title: "Produits" +description : "Spécification du schéma de données Produits" +homepage: "https://github.com/datagouv/jsonschema-template" + +schemas: + - + path: "product.json" + title: "Produits" \ No newline at end of file