Skip to content

Commit

Permalink
fix: use yaml file for schema.data.gouv processes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierlou committed Aug 27, 2024
1 parent 8708184 commit 86d5027
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/integrity_check.py
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions schema.yml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 86d5027

Please sign in to comment.