Last active
October 8, 2015 14:18
-
-
Save kayaelle/f3a16655927ed77a3188 to your computer and use it in GitHub Desktop.
Example of Open Badges Taxonomy Extension
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
/* 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