Created
March 15, 2023 22:22
-
-
Save jfuerth/f873e939343358e168ab0a576ec33907 to your computer and use it in GitHub Desktop.
Example schema for references to DRS objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$id": "https://drs-concepts.example.com/drs-concepts.schema.json", | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"anyOf": [ | |
{ "$ref": "#/$defs/url" }, | |
{ "$ref": "#/$defs/curie" }, | |
], | |
"$defs": { | |
"url": { | |
"title": "DrsObject URL", | |
"description": "Reference to a GA4GH Data Repository Service DrsObject", | |
"type": "string", | |
"pattern": "^drs://[a-zA-Z0-9-]+/.*" | |
}, | |
"curie": { | |
"title": "DrsObject CURIE", | |
"description": "Compact URI reference to a DrsObject", | |
"$comment": "The correct pattern for a CURIE needs to allow all NCName unicode characters from XML, and is out of scope for this example. See <https://www.w3.org/TR/2010/NOTE-curie-20101216/#s_syntax>." | |
"type": "string", | |
"pattern": "^[a-zA-Z0-9_]+:.*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment