Created
July 12, 2018 17:52
-
-
Save Kerruba/c7eaa911c6e4c6cdd0ed1ba800ce67e9 to your computer and use it in GitHub Desktop.
biosamples-v4 json-schema
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
[{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"id": "http://www.ebi.ac.uk/biosamples/0.0.1/sample", | |
"additionalProperties": false, | |
"required": [ | |
"name", | |
"accession" | |
], | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"accession": { | |
"type": "string", | |
"pattern": "^SAM(D|N|E([AG]?))[0-9]+$" | |
}, | |
"domain": { | |
"type": "string" | |
}, | |
"release": { | |
"type": "string", | |
"format": "date-time" // https://stackoverflow.com/questions/47223815/in-jsonschema-the-format-value-should-be-set-as-full-date-or-date | |
}, | |
"update": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"characteristics": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "http://www.ebi.ac.uk/biosamples/0.0.1/characteristic" | |
} | |
}, | |
"relationships": { | |
"type": "array", | |
"items": { | |
"type": "http://www.ebi.ac.uk/biosamples/0.0.1/relationship" | |
} | |
}, | |
"organization": { | |
"type": "array", | |
"items": { | |
"type": "http://www.ebi.ac.uk/biosamples/0.0.1/organisation" | |
} | |
}, | |
"contact": { | |
"type": "array", | |
"items": { | |
"type": "http://www.ebi.ac.uk/biosamples/0.0.1/contact" | |
} | |
}, | |
"publications": { | |
"type": "array", | |
"items": { | |
"type": "http://www.ebi.ac.uk/biosamples/0.0.1/publication" | |
} | |
}, | |
"releaseDate": { | |
"type": "string", | |
"format": "date" | |
}, | |
"updateDate": { | |
"type": "string", | |
"format": "date" | |
}, | |
"_links": { | |
"type": "object", | |
"properties": { | |
"self": { | |
"type": "http://www.ebi.ac.uk/biosamples/0.0.1/_link" | |
} | |
}, | |
"additionalProperties": { | |
"type": "http://www.ebi.ac.uk/biosamples/0.0.1/_link" | |
} | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/characteristic", | |
"additionalProperties": false, | |
"type": "object", | |
"properties": { | |
"text": { | |
"type": "string" | |
}, | |
"ontologyTerms": { | |
"type": "array" | |
}, | |
"unit": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/relationship", | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"source", | |
"type", | |
"target" | |
], | |
"properties": { | |
"source": { | |
"type": "string", | |
"pattern": "^SAM(D|N|E([AG]?))[0-9]+$" | |
}, | |
"type": { | |
"type": "string" | |
}, | |
"target": { | |
"type": "string", | |
"pattern": "^SAM(D|N|E([AG]?))[0-9]+$" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/organization", | |
"additionalProperties": false, | |
"type": "object", | |
"properties": { | |
"Name": { | |
"type": "string" | |
}, | |
"Role": { | |
"type":"string" | |
}, | |
"E-mail": { | |
"type":"string" | |
}, | |
"URL": { | |
"type":"string" | |
}, | |
"Address": { | |
"type":"string" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/contact", | |
"additionalProperties": false, | |
"type": "object", | |
"properties": { | |
"FirstName": { | |
"type": "string" | |
}, | |
"LastName": { | |
"type":"string" | |
}, | |
"MidInitials": { | |
"type":"string" | |
}, | |
"Name": { | |
"type":"string" | |
}, | |
"Role": { | |
"type":"string" | |
}, | |
"E-mail": { | |
"type":"string" | |
}, | |
"Affiliation": { | |
"type":"string" | |
}, | |
"URL": { | |
"type":"string" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/publication", | |
"additionalProperties": false, | |
"type": "object", | |
"properties": { | |
"doi": { | |
"type": "string" | |
}, | |
"pubmed_id": { | |
"type":"string" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/externalReference", | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"url" | |
], | |
"properties": { | |
"url": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/curation", | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"url" | |
], | |
"properties": { | |
"url": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/curationLink", | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"url" | |
], | |
"properties": { | |
"url": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://www.ebi.ac.uk/biosamples/0.0.1/_link", | |
"additionalProperties": { | |
}, | |
"type": "object", | |
"required": [ | |
"href" | |
], | |
"properties": { | |
"href": { | |
"type": "string" | |
}, | |
"templated": { | |
"type": "boolean" | |
} | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment