Skip to content

Instantly share code, notes, and snippets.

@kayaelle
Last active October 8, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kayaelle/f3a16655927ed77a3188 to your computer and use it in GitHub Desktop.
Save kayaelle/f3a16655927ed77a3188 to your computer and use it in GitHub Desktop.
Example of Open Badges Taxonomy Extension
/* Implementation in a badge class */
{
"taxonomyExtensions:casraiEducationHistoryTaxonomy": {
"@context":"http://url-to-extension-context.json",
"type": ["Extension", "taxonomyExtensions:casraiEducationHistoryTaxonomy"],
"ids": [1,3]
}
}
/* Example of context */
{
"@context": {
"obi": "https://w3id.org/openbadges#",
"taxonomyExtensions": "http://url-human-readable-webpage-about-the-taxonomy.html",
"termIds": "http://url-human-readable-webpage-about-the-term-termIds.html",
},
"obi:validation": [
{
"obi:validatesType": "taxonomyExtensions",
"obi:validationSchema": "http://url-to-extension-schema.json"
}
]
}
/* Example of Schema */
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Taxonomy Extension",
"description": "An extension that allows you to add any taxonomy to your Open Badges",
"type": "stringArray",
"properties": {
"termIds": {
"type": "string"
}
},
"required": ["ids"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment