From 672cefad2db28906bee6188df2f933cd2d78b38c Mon Sep 17 00:00:00 2001 From: Yashar Robert Date: Mon, 10 Jun 2024 15:24:01 +0200 Subject: [PATCH] Fix dummy schemas --- docker-compose.yml | 5 +- .../data/datasets/bag/{bag.json => dataset} | 7 +++ .../datasets/belastingen/{reclame => dataset} | 1 + .../precario/{terrassen => terrassen/dataset} | 2 + .../{woonschepen => woonschepen/dataset} | 2 + .../data/datasets/bommen/{bommen => dataset} | 2 + schemas/data/datasets/index.json | 13 ++--- .../sportparken/{sportparken => dataset} | 2 + .../data/datasets/versioned/0.0.1/versioned | 40 ------------- .../data/datasets/versioned/1.0.1/versioned | 40 ------------- .../data/datasets/versioned/1.1.1/versioned | 57 ------------------- schemas/data/publishers/DADI | 10 ++++ schemas/data/publishers/TEST | 10 ++++ schemas/data/publishers/index | 4 ++ 14 files changed, 49 insertions(+), 146 deletions(-) rename schemas/data/datasets/bag/{bag.json => dataset} (99%) rename schemas/data/datasets/belastingen/{reclame => dataset} (98%) rename schemas/data/datasets/belastingen/precario/{terrassen => terrassen/dataset} (97%) rename schemas/data/datasets/belastingen/precario/{woonschepen => woonschepen/dataset} (97%) rename schemas/data/datasets/bommen/{bommen => dataset} (96%) rename schemas/data/datasets/sportparken/{sportparken => dataset} (95%) delete mode 100644 schemas/data/datasets/versioned/0.0.1/versioned delete mode 100644 schemas/data/datasets/versioned/1.0.1/versioned delete mode 100644 schemas/data/datasets/versioned/1.1.1/versioned create mode 100644 schemas/data/publishers/DADI create mode 100644 schemas/data/publishers/TEST create mode 100644 schemas/data/publishers/index diff --git a/docker-compose.yml b/docker-compose.yml index 98c93cbfe..79dfc3e3d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,6 +27,7 @@ services: - "8090:8000" links: - database + - schemas depends_on: database: condition: service_healthy @@ -45,13 +46,14 @@ services: AZURE_APPI_CONNECTION_STRING: "${AZURE_APPI_CONNECTION_STRING}" OAUTH_CLIENT_ID: "${OAUTH_CLIENT_ID}" OAUTH_JWKS_URL: "${OAUTH_JWKS_URL}" + PUB_JWKS: "$(cat src/jwks_test.json)" OAUTH_URL: "${OAUTH_URL}" CLOUD_ENV: "${CLOUD_ENV}" DATAPUNT_API_URL: "${DATAPUNT_API_URL}" DJANGO_DEBUG: 1 APIKEY_ENABLED: "${APIKEY_ENABLED}" INITIALIZE_DB: "${INITIALIZE_DB:-true}" - SCHEMA_URL: "https://schemas.data.amsterdam.nl/datasets/" + SCHEMA_URL: "http://schemas/datasets/" # "https://schemas.data.amsterdam.nl/datasets/" volumes: - ./src:/app - ./docs/build/html:/docs-static @@ -73,4 +75,5 @@ services: - "8080:80" volumes: - "./schemas/data/datasets:/usr/share/nginx/html/datasets" + - "./schemas/data/publishers:/usr/share/nginx/html/publishers" - "./schemas/conf/default.conf:/etc/nginx/conf.d/default.conf" diff --git a/schemas/data/datasets/bag/bag.json b/schemas/data/datasets/bag/dataset similarity index 99% rename from schemas/data/datasets/bag/bag.json rename to schemas/data/datasets/bag/dataset index 2824b4683..2678ea225 100644 --- a/schemas/data/datasets/bag/bag.json +++ b/schemas/data/datasets/bag/dataset @@ -5,6 +5,7 @@ "status": "beschikbaar", "version": "0.0.1", "crs": "EPSG:28992", + "publisher": "test", "tables": [ { "id": "bouwblok", @@ -84,6 +85,9 @@ "date_modified": { "type": "string", "format": "date-time" + }, + "id": { + "type": "string" } } } @@ -426,6 +430,9 @@ }, "indicatie_in_onderzoek": { "type": "integer" + }, + "id": { + "type": "string" } } } diff --git a/schemas/data/datasets/belastingen/reclame b/schemas/data/datasets/belastingen/dataset similarity index 98% rename from schemas/data/datasets/belastingen/reclame rename to schemas/data/datasets/belastingen/dataset index 910632a5c..098da4a34 100644 --- a/schemas/data/datasets/belastingen/reclame +++ b/schemas/data/datasets/belastingen/dataset @@ -6,6 +6,7 @@ "description": "Belastinggebieden en gerelateerde tarieven.", "version": "0.0.1", "crs": "EPSG:28992", + "publisher": "test", "tables": [ { "id": "reclame", diff --git a/schemas/data/datasets/belastingen/precario/terrassen b/schemas/data/datasets/belastingen/precario/terrassen/dataset similarity index 97% rename from schemas/data/datasets/belastingen/precario/terrassen rename to schemas/data/datasets/belastingen/precario/terrassen/dataset index fad3c5b6a..ba9d193e1 100644 --- a/schemas/data/datasets/belastingen/precario/terrassen +++ b/schemas/data/datasets/belastingen/precario/terrassen/dataset @@ -5,6 +5,8 @@ "description": "Precariobelasting terrassen per belastinggebied, per jaar, seizoen en per m2", "version": "0.0.1", "crs": "EPSG:28992", + "publisher": "test", + "status": "beschikbaar", "tables": [ { "id": "terrassen", diff --git a/schemas/data/datasets/belastingen/precario/woonschepen b/schemas/data/datasets/belastingen/precario/woonschepen/dataset similarity index 97% rename from schemas/data/datasets/belastingen/precario/woonschepen rename to schemas/data/datasets/belastingen/precario/woonschepen/dataset index ac9042fbb..9dd2899c2 100644 --- a/schemas/data/datasets/belastingen/precario/woonschepen +++ b/schemas/data/datasets/belastingen/precario/woonschepen/dataset @@ -5,6 +5,8 @@ "description": "Precariobelasting woonschepen per belastinggebied, per jaar, seizoen en per m2", "version": "0.0.1", "crs": "EPSG:28992", + "publisher": "test", + "status": "beschikbaar", "tables": [ { "id": "woonschepen", diff --git a/schemas/data/datasets/bommen/bommen b/schemas/data/datasets/bommen/dataset similarity index 96% rename from schemas/data/datasets/bommen/bommen rename to schemas/data/datasets/bommen/dataset index a2352413f..e99a781be 100644 --- a/schemas/data/datasets/bommen/bommen +++ b/schemas/data/datasets/bommen/dataset @@ -4,6 +4,8 @@ "title": "", "version": "0.0.1", "crs": "EPSG:28992", + "publisher": "test", + "status": "beschikbaar", "tables": [ { "id": "bommen", diff --git a/schemas/data/datasets/index.json b/schemas/data/datasets/index.json index d073c10e8..975842b06 100644 --- a/schemas/data/datasets/index.json +++ b/schemas/data/datasets/index.json @@ -1,11 +1,8 @@ { - "bag": "bag/bag.json", - "bommen": "bommen/bommen", - "sportparken": "sportparken/sportparken", - "reclame": "belastingen/reclame", + "bag": "bag", + "bommen": "bommen", + "sportparken": "sportparken", + "reclame": "belastingen", "terrassen": "belastingen/precario/terrassen", - "woonschepen": "belastingen/precario/woonschepen", - "versioned": "versioned/1.0.1/versioned", - "versioned_1_1_1": "versioned/1.1.1/versioned", - "versioned_0_0_1": "versioned/0.0.1/versioned" + "woonschepen": "belastingen/precario/woonschepen" } diff --git a/schemas/data/datasets/sportparken/sportparken b/schemas/data/datasets/sportparken/dataset similarity index 95% rename from schemas/data/datasets/sportparken/sportparken rename to schemas/data/datasets/sportparken/dataset index ce379d21b..6bb30d605 100644 --- a/schemas/data/datasets/sportparken/sportparken +++ b/schemas/data/datasets/sportparken/dataset @@ -4,6 +4,8 @@ "title": "", "version": "0.0.1", "crs": "EPSG:28992", + "publisher": "test", + "status": "beschikbaar", "tables": [ { "id": "sportparken", diff --git a/schemas/data/datasets/versioned/0.0.1/versioned b/schemas/data/datasets/versioned/0.0.1/versioned deleted file mode 100644 index f43e50460..000000000 --- a/schemas/data/datasets/versioned/0.0.1/versioned +++ /dev/null @@ -1,40 +0,0 @@ -{ - "id": "versioned", - "type": "dataset", - "title": "", - "version": "0.0.1", - "default_version": "1.0.1", - "crs": "EPSG:28992", - "tables": [ - { - "id": "versioned", - "type": "table", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ - "id", - "schema" - ], - "properties": { - "id": { - "$ref": "https://schemas.data.amsterdam.nl/schema@v1.1.0#/definitions/id", - "description": "uniek" - }, - "schema": { - "$ref": "https://schemas.data.amsterdam.nl/schema@v1.1.0#/definitions/schema" - }, - "kenmerk": { - "type": "string", - "description": "Kenmerk" - }, - "opmerk": { - "type": "string", - "description": "Opmerkingen" - } - } - } - } - ] -} diff --git a/schemas/data/datasets/versioned/1.0.1/versioned b/schemas/data/datasets/versioned/1.0.1/versioned deleted file mode 100644 index d50d0396d..000000000 --- a/schemas/data/datasets/versioned/1.0.1/versioned +++ /dev/null @@ -1,40 +0,0 @@ -{ - "id": "versioned", - "type": "dataset", - "title": "", - "version": "1.0.1", - "default_version": "1.0.1", - "crs": "EPSG:28992", - "tables": [ - { - "id": "versioned", - "type": "table", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ - "id", - "schema" - ], - "properties": { - "id": { - "$ref": "https://schemas.data.amsterdam.nl/schema@v1.1.0#/definitions/id", - "description": "uniek" - }, - "schema": { - "$ref": "https://schemas.data.amsterdam.nl/schema@v1.1.0#/definitions/schema" - }, - "kenmerk": { - "type": "string", - "description": "Kenmerk" - }, - "opmerkingen": { - "type": "string", - "description": "Opmerkingen" - } - } - } - } - ] -} diff --git a/schemas/data/datasets/versioned/1.1.1/versioned b/schemas/data/datasets/versioned/1.1.1/versioned deleted file mode 100644 index f43c70a64..000000000 --- a/schemas/data/datasets/versioned/1.1.1/versioned +++ /dev/null @@ -1,57 +0,0 @@ -{ - "id": "versioned", - "type": "dataset", - "title": "", - "version": "1.1.1", - "default_version": "1.0.1", - "crs": "EPSG:28992", - "tables": [ - { - "id": "versioned", - "type": "table", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ - "id", - "schema" - ], - "properties": { - "id": { - "$ref": "https://schemas.data.amsterdam.nl/schema@v1.1.0#/definitions/id", - "description": "uniek" - }, - "schema": { - "$ref": "https://schemas.data.amsterdam.nl/schema@v1.1.0#/definitions/schema" - }, - "kenmerk": { - "type": "string", - "description": "Kenmerk" - }, - "datum": { - "type": "string", - "description": "Datum", - "format": "date-time" - }, - "bron": { - "type": "string", - "description": "Bron" - }, - "intekening": { - "type": "string", - "description": "Intekening" - }, - "nauwkeurig": { - "type": "string", - "description": "Nauwkeurig" - }, - "opmerkingen": { - "type": "string", - "description": "Opmerkingen" - } - } - } - } - ] -} diff --git a/schemas/data/publishers/DADI b/schemas/data/publishers/DADI new file mode 100644 index 000000000..4c0dc952b --- /dev/null +++ b/schemas/data/publishers/DADI @@ -0,0 +1,10 @@ +{ + "name": "Datadiensten", + "id": "DADI", + "shortname": "dadi", + "tags": { + "team": "Datadiensten", + "costcenter": "76400115.4430" + }, + "type": "publisher" +} diff --git a/schemas/data/publishers/TEST b/schemas/data/publishers/TEST new file mode 100644 index 000000000..68037184b --- /dev/null +++ b/schemas/data/publishers/TEST @@ -0,0 +1,10 @@ +{ + "name": "Testpublisher", + "id": "DATESTDI", + "shortname": "test", + "tags": { + "team": "Datadiensten", + "costcenter": "76400115.4430" + }, + "type": "publisher" +} diff --git a/schemas/data/publishers/index b/schemas/data/publishers/index new file mode 100644 index 000000000..5c463bba3 --- /dev/null +++ b/schemas/data/publishers/index @@ -0,0 +1,4 @@ +[ + "DADI", + "TEST" +]