diff --git a/erp/export/generate_schema.py b/erp/export/generate_schema.py index 6bf8d18fc..8d66eda52 100644 --- a/erp/export/generate_schema.py +++ b/erp/export/generate_schema.py @@ -41,8 +41,8 @@ def generate_schema( table_schema = Schema.from_descriptor(base) descriptor = table_schema.to_descriptor() - descriptor["path"] = repository + "schema.json" - descriptor["resources"][0]["path"] = repository + "exemple-valide.csv" + descriptor["path"] = repository + "base/schema_base.json" + descriptor["resources"][0]["path"] = repository + "base/base-valid-sample.csv" field_types = [] for field_name in EtalabMapper.headers(): diff --git a/erp/export/static/base-schema.json b/erp/export/static/base-schema.json index 48b8e8696..fadb6ccc7 100644 --- a/erp/export/static/base-schema.json +++ b/erp/export/static/base-schema.json @@ -6,7 +6,7 @@ "keywords": ["accessibilite", "access", "a11y"], "countryCode": "FR", "homepage": "https://github.com/MTES-MCT/acceslibre-schema", - "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/schema.json", + "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_base.json", "licenses": [ { "title": "Etalab Licence Ouverte 2.0", @@ -17,19 +17,19 @@ "resources": [ { "title": "Fichier valide (CSV)", - "name": "exemple-valide-csv", - "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/exemple-valide.csv" + "name": "base-valid-sample.csv", + "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/base-valid-sample.csv" }, { "title": "Schéma au format XLS", - "name": "schema_format_xls", - "path": "https://github.com/MTES-MCT/acceslibre-schema/blob/v0.0.19/schema_format_excel.xls" + "name": "schema_data_base.xls", + "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_data_base.xls" } ], "sources": [], "created": "2021-03-10", "lastModified": "2025-12-23", - "version": "0.0.19", + "version": "0.0.20", "contributors": [ { "title": "Christophe Vanfrackem", diff --git a/erp/export/static/schema.json b/erp/export/static/schema.json index f7c1f958d..03abb0b84 100644 --- a/erp/export/static/schema.json +++ b/erp/export/static/schema.json @@ -2406,7 +2406,7 @@ "keywords": ["accessibilite", "access", "a11y"], "countryCode": "FR", "homepage": "https://github.com/MTES-MCT/acceslibre-schema", - "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/schema.json", + "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_base.json", "licenses": [ { "title": "Etalab Licence Ouverte 2.0", @@ -2417,19 +2417,19 @@ "resources": [ { "title": "Fichier valide (CSV)", - "name": "exemple-valide-csv", - "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/exemple-valide.csv" + "name": "base-valid-sample.csv", + "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/base-valid-sample.csv" }, { "title": "Schéma au format XLS", - "name": "schema_format_xls", - "path": "https://github.com/MTES-MCT/acceslibre-schema/blob/v0.0.19/schema_format_excel.xls" + "name": "schema_data_base.xls", + "path": "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/base/schema_data_base.xls" } ], "sources": [], "created": "2021-03-10", "lastModified": "2025-12-23", - "version": "0.0.19", + "version": "0.0.20", "contributors": [ { "title": "Christophe Vanfrackem", diff --git a/erp/management/commands/generate_schema.py b/erp/management/commands/generate_schema.py index ca5992b49..b8736eb89 100644 --- a/erp/management/commands/generate_schema.py +++ b/erp/management/commands/generate_schema.py @@ -22,7 +22,7 @@ def add_arguments(self, parser): def handle(self, *args, **options): base = options.get("base-file", self.default_dir + "/base-schema.json") outfile = options.get("out-file", self.default_dir + "/schema.json") - repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/" + repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/" try: generate_schema(base=base, outfile=outfile, repository=repository) print(f"Schema generated to: {outfile}") diff --git a/tests/erp/test_export.py b/tests/erp/test_export.py index 78451a25a..8b400ba28 100644 --- a/tests/erp/test_export.py +++ b/tests/erp/test_export.py @@ -318,7 +318,7 @@ def test_export_failure(mocker, settings): def test_generate_schema(db, activite): base = "erp/export/static/base-schema.json" outfile = "schema-test.json" - repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.19/" + repository = "https://github.com/MTES-MCT/acceslibre-schema/raw/v0.0.20/" generate_schema(base, outfile, repository)