mozilla/openbadges-discussion — pull request #11 by ottonomy (2014-02-23 21:21:46+00:00)
Title: defines badgeClass in JSON-schema, sample extension, & sample badgeClass

I started with a sample badgeClass, including a simple badgeClassExtension that allows issuers to define an age target in years or US standard grades (as human readable strings like "6-12" or "P-20").

Initially I used @kayaelle's example from mozilla/openbadges-discussion/issues/8 but I made a couple small changes that I think might help the extensions work better with JSON-schema.

I made each extension, as included in the badgeClass, be an object with two properties ("badgeSpecification" and "content") rather than just a "badgeSpecification" object followed by more properties that vary depending on the extension. I think for validation, we will want to compare the "content" object to the schema at the reference URL defined in badgeSpecification["reference"].

Please correct any errors you might find, and investigate any changes that would improve things.

Hopefully ya'll don't mind my folder structure. I put these in a folder for JSON-schema based exploration, thinking others could create separate folders for JSON-LD and current-spec style namespaced properties.