Skip to content

Commit 84f3b4b

Browse files
authored
Merge pull request #1632 from HumanCellAtlas/hs-compact-drs-uris
Add support for compact identifier-based DRS URIs in file descriptors
2 parents 6625dda + ba72595 commit 84f3b4b

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and (starting with v4.0.0) this project adheres to [Semantic Versioning](http://
77

88
## [Unreleased](https://github.com/HumanCellAtlas/metadata-schema/tree/staging)
99

10+
### [system/file_descriptor.json - v2.2.0] - 2025-11-04
11+
### Added
12+
Added support for compact identifier-based DRS URIs in file descriptors
13+
1014
### [module/biomaterial/human_specific.json - v1.1.0] - 2025-11-12
1115
### Added
1216
Added optional ethnicity_question

json_schema/system/file_descriptor.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,22 @@
9898
"drs_uri": {
9999
"description": "Data Repository Service URI pointing at this file. If this property is absent, a data file exists in the repository containing this descriptor. If this property is present and not `null`, a data file exists in another repository at the specified URI. If this property is present but `null`, the data file is not available, but will likely become available in the future, along with an updated descriptor referencing it.",
100100
"user_friendly": "Data Repository Service URI",
101-
"type": ["string", "null"],
102-
"format": "uri",
101+
"anyOf": [
102+
{
103+
"type": "null"
104+
},
105+
{
106+
"$comment": "Host-based DRS URI. We use the `uri` format so as to not reinvent the wheel but we need to disallow colons in the authority (what the DRS spec calls hostname) and in the path (what the DRS spec calls ID). The DRS spec explicitly states that the hostname can't have a colon. And if we allowed colons in the ID, `drs://a/b:c` would be ambiguous: it could be a host-based DRS URI with hostname `a` and ID `b:c` or a compact identifier-based DRS URI with prefix `a/b` and accession `c`.",
107+
"type": "string",
108+
"format": "uri",
109+
"pattern": "^drs://[^/:]+/[^:]+$"
110+
},
111+
{
112+
"$comment": "Compact identifier-based DRS URI. We can't use the `uri` format because a colon in the URI authority must be followed by a numeric port number, whereas the DRS spec simply says to use the compact identifier verbatim, without escaping the colon that separates prefix and accession. Accessions arent't necessarily numeric. We can be pretty restrictive about the prefix (optional provider code, followed by slash and namespace) because the spec explicitly lists the allowed characters, but like the ID in host-based DRS URIs, there are no such restrictions for accession.",
113+
"type": "string",
114+
"pattern": "^drs://([A-Za-z0-9._]+/)?[A-Za-z0-9._]+:.+$"
115+
}
116+
],
103117
"example": "drs://drs.example.org/314159"
104118
}
105119
}

json_schema/versions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"last_update_date": "2025-11-12T15:35:25Z",
2+
"last_update_date": "2025-11-12T19:07:05Z",
33
"version_numbers": {
44
"core": {
55
"biomaterial": {
@@ -89,7 +89,7 @@
8989
}
9090
},
9191
"system": {
92-
"file_descriptor": "2.1.0",
92+
"file_descriptor": "2.2.0",
9393
"license": "1.0.0",
9494
"links": "3.1.0",
9595
"provenance": "1.1.0"

0 commit comments

Comments
 (0)