Skip to content

Commit 8f06077

Browse files
committed
feat(capabilities): add INSPIRE fields
1 parent d239091 commit 8f06077

File tree

6 files changed

+90
-24
lines changed

6 files changed

+90
-24
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.scannerwork/
1+
.scannerwork/
2+
node_modules

docker/config/service.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"name": "Road2",
44
"title": "Service de calcul d'itinéraire",
55
"description": "Ce service permet de calculer des itinéraires sur les données du Géoportail.",
6-
"url": "https://localhost/",
76
"provider": {
87
"name": "IGN",
98
"site": "www.ign.fr",
@@ -50,7 +49,7 @@
5049
"cors": {
5150
"configuration": "/home/docker/config/cors.json"
5251
}
53-
},
52+
},
5453
"projections": {
5554
"directory": "/home/docker/config/projections/"
5655
},

documentation/apis/administration/1.0.0/api.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,9 +1353,27 @@
13531353
"type": "string",
13541354
"example": "Ce service permet de calculer des itinéraires sur les données du Géoportail."
13551355
},
1356-
"url": {
1356+
"language": {
13571357
"type": "string",
1358-
"example": "https://localhost/"
1358+
"example": "Français"
1359+
},
1360+
"contact": {
1361+
"type": "object",
1362+
"properties": {
1363+
"email": {
1364+
"type": "string",
1365+
"example": "contact.geoservices@ign.fr"
1366+
}
1367+
}
1368+
},
1369+
"keywords": {
1370+
"type": "object",
1371+
"properties": {
1372+
"keyword": {
1373+
"type": "string",
1374+
"example": "infoMapAccessService"
1375+
}
1376+
}
13591377
},
13601378
"provider": {
13611379
"type": "object",

documentation/configuration/services/service_model.yaml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,26 @@
1717
"description":
1818
type: string
1919
required: true
20-
# Url du service qui va apparaître dans le getcap
21-
"url":
22-
type: string
23-
required: true
20+
"language":
21+
type: string
22+
required: false
23+
# Informations de contact
24+
"contact":
25+
type: object
26+
required: false
27+
properties:
28+
# Adresse mail du fournisseur
29+
"email":
30+
type: string
31+
required: true*
32+
# Mots clefs associés au service
33+
"keywords":
34+
type: object
35+
required: false
36+
properties:
37+
"keyword":
38+
type: string
39+
required: true
2440
# Information sur le fournisseur du service
2541
"provider":
2642
type: object
@@ -90,7 +106,7 @@
90106
items:
91107
type: object
92108
properties:
93-
# Id du serveur
109+
# Id du serveur
94110
"id":
95111
type: string
96112
required: true
@@ -104,7 +120,7 @@
104120
required: true
105121
# Utilisation du HTTPS
106122
"https":
107-
type: string
123+
type: string
108124
enum: ["true", "false"]
109125
required: true
110126
# Options pour le HTTPS (nécessaire si https="true")
@@ -121,13 +137,13 @@
121137
type: string
122138
required: true
123139
# Configuration des cors
124-
"cors":
125-
type: object
140+
"cors":
141+
type: object
126142
required: false
127143
properties:
128-
# Fichier de configuration des cors
129-
"configuration":
130-
type: string
144+
# Fichier de configuration des cors
145+
"configuration":
146+
type: string
131147
required: true
132148
# Configuration des projections disponibles
133149
"projections":

documentation_en/apis/administration/1.0.0/api.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,9 +1353,27 @@
13531353
"type": "string",
13541354
"example": "Ce service permet de calculer des itinéraires sur les données du Géoportail."
13551355
},
1356-
"url": {
1356+
"language": {
13571357
"type": "string",
1358-
"example": "https://localhost/"
1358+
"example": "Français"
1359+
},
1360+
"contact": {
1361+
"type": "object",
1362+
"properties": {
1363+
"email": {
1364+
"type": "string",
1365+
"example": "contact.geoservices@ign.fr"
1366+
}
1367+
}
1368+
},
1369+
"keywords": {
1370+
"type": "object",
1371+
"properties": {
1372+
"keyword": {
1373+
"type": "string",
1374+
"example": "infoMapAccessService"
1375+
}
1376+
}
13591377
},
13601378
"provider": {
13611379
"type": "object",
@@ -1859,4 +1877,4 @@
18591877
}
18601878
}
18611879
}
1862-
}
1880+
}

src/js/apis/simple/1.0.0/init.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,25 @@ module.exports = {
3636
getCapabilities.info.title = globalConfiguration.application.title;
3737
// info.description
3838
getCapabilities.info.description = globalConfiguration.application.description;
39-
// info.url
40-
getCapabilities.info.url = globalConfiguration.application.url;
39+
// info.language
40+
getCapabilities.info.language = "";
41+
if (globalConfiguration.application.language) {
42+
getCapabilities.info.language = globalConfiguration.application.language;
43+
}
44+
// info.keywords
45+
getCapabilities.info.keywords = {};
46+
if (globalConfiguration.application.keywords) {
47+
getCapabilities.info.keywords.keyword = globalConfiguration.application.keywords.keyword;
48+
}
49+
// info.contact
50+
getCapabilities.info.contact = {};
51+
if (globalConfiguration.application.contact) {
52+
getCapabilities.info.contact.email = globalConfiguration.application.contact.email;
53+
}
4154

42-
// provider
55+
// provider
4356
getCapabilities.provider = {};
44-
57+
4558
if (globalConfiguration.application.provider) {
4659

4760
// provider.name
@@ -61,6 +74,7 @@ module.exports = {
6174
getCapabilities.provider.mail = "";
6275
}
6376

77+
6478
// api
6579
getCapabilities.api = {};
6680
// api.name
@@ -575,7 +589,7 @@ module.exports = {
575589
crsParameterDescription.example = "EPSG:4326";
576590
nearestDescription.parameters.push(crsParameterDescription);
577591

578-
592+
579593

580594
// -- end nearest.parameters
581595

0 commit comments

Comments
 (0)