From 8f06077e99b2acd45de5ff0c298a02207689cf43 Mon Sep 17 00:00:00 2001 From: "amaury.zarzelli" Date: Tue, 23 Dec 2025 10:24:26 +0100 Subject: [PATCH 1/2] feat(capabilities): add INSPIRE fields --- .gitignore | 3 +- docker/config/service.json | 3 +- .../apis/administration/1.0.0/api.json | 22 ++++++++++- .../configuration/services/service_model.yaml | 38 +++++++++++++------ .../apis/administration/1.0.0/api.json | 24 ++++++++++-- src/js/apis/simple/1.0.0/init.js | 24 +++++++++--- 6 files changed, 90 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index f2ed2b7d..00354fe2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.scannerwork/ \ No newline at end of file +.scannerwork/ +node_modules diff --git a/docker/config/service.json b/docker/config/service.json index 1dec91f6..9789f962 100644 --- a/docker/config/service.json +++ b/docker/config/service.json @@ -3,7 +3,6 @@ "name": "Road2", "title": "Service de calcul d'itinéraire", "description": "Ce service permet de calculer des itinéraires sur les données du Géoportail.", - "url": "https://localhost/", "provider": { "name": "IGN", "site": "www.ign.fr", @@ -50,7 +49,7 @@ "cors": { "configuration": "/home/docker/config/cors.json" } - }, + }, "projections": { "directory": "/home/docker/config/projections/" }, diff --git a/documentation/apis/administration/1.0.0/api.json b/documentation/apis/administration/1.0.0/api.json index 94a168d0..dae69ec6 100644 --- a/documentation/apis/administration/1.0.0/api.json +++ b/documentation/apis/administration/1.0.0/api.json @@ -1353,9 +1353,27 @@ "type": "string", "example": "Ce service permet de calculer des itinéraires sur les données du Géoportail." }, - "url": { + "language": { "type": "string", - "example": "https://localhost/" + "example": "Français" + }, + "contact": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "contact.geoservices@ign.fr" + } + } + }, + "keywords": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "example": "infoMapAccessService" + } + } }, "provider": { "type": "object", diff --git a/documentation/configuration/services/service_model.yaml b/documentation/configuration/services/service_model.yaml index 5edef64d..a8fb3350 100644 --- a/documentation/configuration/services/service_model.yaml +++ b/documentation/configuration/services/service_model.yaml @@ -17,10 +17,26 @@ "description": type: string required: true - # Url du service qui va apparaître dans le getcap - "url": - type: string - required: true + "language": + type: string + required: false + # Informations de contact + "contact": + type: object + required: false + properties: + # Adresse mail du fournisseur + "email": + type: string + required: true* + # Mots clefs associés au service + "keywords": + type: object + required: false + properties: + "keyword": + type: string + required: true # Information sur le fournisseur du service "provider": type: object @@ -90,7 +106,7 @@ items: type: object properties: - # Id du serveur + # Id du serveur "id": type: string required: true @@ -104,7 +120,7 @@ required: true # Utilisation du HTTPS "https": - type: string + type: string enum: ["true", "false"] required: true # Options pour le HTTPS (nécessaire si https="true") @@ -121,13 +137,13 @@ type: string required: true # Configuration des cors - "cors": - type: object + "cors": + type: object required: false properties: - # Fichier de configuration des cors - "configuration": - type: string + # Fichier de configuration des cors + "configuration": + type: string required: true # Configuration des projections disponibles "projections": diff --git a/documentation_en/apis/administration/1.0.0/api.json b/documentation_en/apis/administration/1.0.0/api.json index e6ee622f..3b4fcc50 100644 --- a/documentation_en/apis/administration/1.0.0/api.json +++ b/documentation_en/apis/administration/1.0.0/api.json @@ -1353,9 +1353,27 @@ "type": "string", "example": "Ce service permet de calculer des itinéraires sur les données du Géoportail." }, - "url": { + "language": { "type": "string", - "example": "https://localhost/" + "example": "Français" + }, + "contact": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "contact.geoservices@ign.fr" + } + } + }, + "keywords": { + "type": "object", + "properties": { + "keyword": { + "type": "string", + "example": "infoMapAccessService" + } + } }, "provider": { "type": "object", @@ -1859,4 +1877,4 @@ } } } - } \ No newline at end of file + } diff --git a/src/js/apis/simple/1.0.0/init.js b/src/js/apis/simple/1.0.0/init.js index 1ce89800..988cd8e9 100644 --- a/src/js/apis/simple/1.0.0/init.js +++ b/src/js/apis/simple/1.0.0/init.js @@ -36,12 +36,25 @@ module.exports = { getCapabilities.info.title = globalConfiguration.application.title; // info.description getCapabilities.info.description = globalConfiguration.application.description; - // info.url - getCapabilities.info.url = globalConfiguration.application.url; + // info.language + getCapabilities.info.language = ""; + if (globalConfiguration.application.language) { + getCapabilities.info.language = globalConfiguration.application.language; + } + // info.keywords + getCapabilities.info.keywords = {}; + if (globalConfiguration.application.keywords) { + getCapabilities.info.keywords.keyword = globalConfiguration.application.keywords.keyword; + } + // info.contact + getCapabilities.info.contact = {}; + if (globalConfiguration.application.contact) { + getCapabilities.info.contact.email = globalConfiguration.application.contact.email; + } - // provider + // provider getCapabilities.provider = {}; - + if (globalConfiguration.application.provider) { // provider.name @@ -61,6 +74,7 @@ module.exports = { getCapabilities.provider.mail = ""; } + // api getCapabilities.api = {}; // api.name @@ -575,7 +589,7 @@ module.exports = { crsParameterDescription.example = "EPSG:4326"; nearestDescription.parameters.push(crsParameterDescription); - + // -- end nearest.parameters From 56c5903c471f9c31a8bbe8812bb36abca1896ef8 Mon Sep 17 00:00:00 2001 From: Amaury Zarzelli Date: Tue, 23 Dec 2025 11:15:13 +0100 Subject: [PATCH 2/2] Update changelog for version 2.3.0 Added new fields in capabilities for INSPIRE compliance. --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index e39e0ece..f6e9f434 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # CHANGELOG +## 2.3.0 +ADDED: +- new fields in capabilities for INSPIRE compliance + ## 2.2.11 UPDATED: - Updated Dockefile: donwgrade node version to 16 for compatibility with OSRM 5.26.0