Skip to content

Instantly share code, notes, and snippets.

@mrenvoize
Created September 16, 2015 11:29
Show Gist options
  • Save mrenvoize/a3ceea1960e58de19e39 to your computer and use it in GitHub Desktop.
Save mrenvoize/a3ceea1960e58de19e39 to your computer and use it in GitHub Desktop.
json-schema example
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://site.rebuslist.com/schemas/csl-data.json",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"article",
"article-journal",
"article-magazine",
"article-newspaper",
"bill",
"book",
"broadcast",
"chapter",
"dataset",
"entry",
"entry-dictionary",
"entry-encyclopedia",
"figure",
"graphic",
"interview",
"journal",
"legal_case",
"legislation",
"manuscript",
"map",
"motion_picture",
"musical_score",
"pamphlet",
"paper-conference",
"patent",
"personal_communication",
"post",
"post-weblog",
"report",
"review",
"review-book",
"song",
"speech",
"thesis",
"treaty",
"webpage"
]
},
"id": {
"type": [
"string",
"number"
]
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"language": {
"type": "string"
},
"journalAbbreviation": {
"type": "string"
},
"shortTitle": {
"type": "string"
},
"author": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"collection-editor": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"composer": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"container-author": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"director": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"editor": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"editorial-director": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"interviewer": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"illustrator": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"original-author": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"recipient": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"reviewed-author": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"translator": {
"type": "array",
"items": {
"$ref": "name-variable"
}
},
"accessed": {
"$ref": "date-variable"
},
"container": {
"$ref": "date-variable"
},
"event-date": {
"$ref": "date-variable"
},
"issued": {
"$ref": "date-variable"
},
"original-date": {
"$ref": "date-variable"
},
"submitted": {
"$ref": "date-variable"
},
"abstract": {
"type": "string"
},
"annote": {
"type": "string"
},
"archive": {
"type": "string"
},
"archive_location": {
"type": "string"
},
"archive-place": {
"type": "string"
},
"authority": {
"type": "string"
},
"call-number": {
"type": "string"
},
"chapter-number": {
"type": "string"
},
"citation-number": {
"type": "string"
},
"citation-label": {
"type": "string"
},
"collection-number": {
"type": "string"
},
"collection-title": {
"type": "string"
},
"container-title": {
"type": "string"
},
"container-title-short": {
"type": "string"
},
"dimensions": {
"type": "string"
},
"DOI": {
"type": "string"
},
"edition": {
"type": [
"string",
"number"
]
},
"event": {
"type": "string"
},
"event-place": {
"type": "string"
},
"first-reference-note-number": {
"type": "string"
},
"genre": {
"type": "string"
},
"ISBN": {
"type": "string"
},
"ISSN": {
"type": "string"
},
"issue": {
"type": [
"string",
"number"
]
},
"jurisdiction": {
"type": "string"
},
"keyword": {
"type": "string"
},
"locator": {
"type": "string"
},
"medium": {
"type": "string"
},
"note": {
"type": "string"
},
"number": {
"type": [
"string",
"number"
]
},
"number-of-pages": {
"type": "string"
},
"number-of-volumes": {
"type": [
"string",
"number"
]
},
"original-publisher": {
"type": "string"
},
"original-publisher-place": {
"type": "string"
},
"original-title": {
"type": "string"
},
"page": {
"type": "string"
},
"page-first": {
"type": "string"
},
"PMCID": {
"type": "string"
},
"PMID": {
"type": "string"
},
"publisher": {
"type": "string"
},
"publisher-place": {
"type": "string"
},
"references": {
"type": "string"
},
"reviewed-title": {
"type": "string"
},
"scale": {
"type": "string"
},
"section": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string"
},
"title": {
"type": "string"
},
"title-short": {
"type": "string"
},
"URL": {
"type": "string"
},
"version": {
"type": "string"
},
"volume": {
"type": [
"string",
"number"
]
},
"year-suffix": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"id"
],
"definitions": {
"name-variable": {
"anyOf": [{
"type": "object",
"properties": {
"family": {
"type": "string"
},
"given": {
"type": "string"
},
"dropping-particle": {
"type": "string"
},
"non-dropping-particle": {
"type": "string"
},
"suffix": {
"type": "string"
},
"comma-suffix": {
"type": [
"string",
"number",
"boolean"
]
},
"static-ordering": {
"type": [
"string",
"number",
"boolean"
]
},
"literal": {
"type": "string"
},
"parse-names": {
"type": [
"string",
"number",
"boolean"
]
}
},
"additionalProperties": false
}, {
"type": "object",
"properties": {
"literal": {
"type": "string"
}
},
"additionalProperties": false
}]
},
"date-variable": {
"anyOf": [{
"type": "object",
"properties": {
"date-parts": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
},
"maxItems": 3
},
"maxItems": 2
},
"season": {
"type": [
"string",
"number"
]
},
"circa": {
"type": [
"string",
"number",
"boolean"
]
},
"literal": {
"type": "string"
},
"raw": {
"type": "string"
}
},
"additionalProperties": false
}, {
"type": "object",
"properties": {
"literal": {
"type": "string"
}
},
"additionalProperties": false
}]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment