Skip to content

Commit 449f380

Browse files
authored
Add validation rules for Wikidata entity URIs
1 parent 587fc91 commit 449f380

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ComponentRegistry/src/main/resources/conceptUriRules.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,26 @@
5959
]
6060
}
6161
}]
62+
}, {
63+
"types": ["*"],
64+
"rules": [{
65+
"reason": "Not a valid Wikidata entity URI (check documentation)",
66+
"warning": {
67+
"regex": [
68+
"^http(s?):\\/\\/.*wikidata.org\\/([^e]|e[^n]|en[^t]|ent[^i]|enti[^t]|entit[^y]|entity[^\\/])"
69+
]
70+
}
71+
}]
72+
}, {
73+
"types": ["*"],
74+
"rules": [{
75+
"reason": "Wikidata entity URIs start with http: (check documentation)",
76+
"warning": {
77+
"regex": [
78+
"^https:\\/\\/.*wikidata.org\\/entity"
79+
]
80+
}
81+
}]
6282
}
6383
]
6484
}

0 commit comments

Comments
 (0)