From 0138641f9b8ae68fdb604e080c0c9e072a49b6de Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Sun, 23 Feb 2014 13:08:55 -0800 Subject: [PATCH 01/13] defines badgeClass in JSON-schema, a sample extension for age target, and a sample extended badge class that uses it --- badgeExtensions-schema/badgeClass.json | 21 +++++ .../schema-age-target-v0.5.json | 16 ++++ badgeExtensions-schema/schema-badgeClass.json | 88 +++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 badgeExtensions-schema/badgeClass.json create mode 100644 badgeExtensions-schema/schema-age-target-v0.5.json create mode 100644 badgeExtensions-schema/schema-badgeClass.json diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json new file mode 100644 index 0000000..3c344a8 --- /dev/null +++ b/badgeExtensions-schema/badgeClass.json @@ -0,0 +1,21 @@ +{ + "name": "Sample Extended Badge", + "description": "For doing awesome things in fairly standard ways.", + "image": "https://example.org/extended-badge-longcat.png", + "criteria": "https://example.org/extended-badge.html", + "tags": ["badgeClassExtensions"], + "issuer": "https://example.org/organization.json", + "badgeClassExtensions": [ + { + "badgeSpecification": { + "title": "Badge Age Target", + "reference": "http://this-domain.org/schema-age-target-v0.5.json", + "version": "0.5" + }, + "content": { + "age": "5-18", + "grade": "K-12" + } + }, + ] +} \ No newline at end of file diff --git a/badgeExtensions-schema/schema-age-target-v0.5.json b/badgeExtensions-schema/schema-age-target-v0.5.json new file mode 100644 index 0000000..4dd45be --- /dev/null +++ b/badgeExtensions-schema/schema-age-target-v0.5.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title" : "Badge Age Target", + "description": "A suggested age or US grade range targeted by the described badge or learning experience. Use one or both options.", + "type": "object", + "properties": { + "age": { + "description": "The targeted age range for a badge or learning experience (e.g. '6-10')", + "type": "string" + }, + "grade": { + "description": "The targeted US grade range for a badge or learning experience (e.g. 'K-3')", + "type": "string" + } + } +} \ No newline at end of file diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json new file mode 100644 index 0000000..cb0bdc9 --- /dev/null +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -0,0 +1,88 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title" : "Open Badge BadgeClass Definition v1.1", + "description": "A suggested age or US grade range targeted by the described badge or learning experience. Use one or both options.", + "type": "object", + "properties": { + "name": { + "description": "A name or title of the particular badge defined in the present badge class, which could then be issued to many recipients.", + "type": "string" + }, + "description": { + "description": "A short description of the achievement represented by the present badge.", + "type": "string" + }, + "image": { + "description": "The URL of the image that represents the present achievement. It will be baked into a complete badge for each recipient.", + "type": "string" + }, + "criteria": { + "description": "The URL of a human-readable page describing the URL of the criteria for earning the achievement. If the badge represents an educational achievement, consider marking up this up with LRMI.", + "type": "string" + }, + "issuer": { + "description": "URL of an object describing the organization that issued the badge. Endpoint should be JSON following the IssuerOrganization schema", + "type": "string" + }, + "tags": { + "description": "An array of text: List of tags that describe the type of achievement.", + "type": "array", + "items": { + "type": "string" + } + }, + "alignment": { + "description": "List of objects describing which educational standards this badge aligns to, if any. An array of AlignmentObjects.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "Name of the alignment.", + "type": "string" + }, + "url": { + "description": "URL linking to the official description of the standard.", + "type": "string" + }, + "description": { + "description": "Short description of the standard.", + "type": "string" + } + }, + "required": ["name","url"] + } + }, + "badgeClassExtensions": { + "description": "An array of objects each linking to and fulfilling a schema for additional badge class information", + "type": "array", + "items": { + "type": "object", + "properties": { + "badgeSpecification": { + "type": "object", + "properties": { + "title": { + "description": "Short descriptive name of the extension that indicates what information it will add to the badgeClass.", + "type": "string" + }, + "reference": { + "description": "URL to the JSON-schema file defining the structure of this extension", + "type": "string" + }, + "version": { + "description": "Version string of the extension (is this necessary or should it be folded into the reference?)", + "type": "string" + } + }, + "required": ["reference"] + }, + "content": { + "type": "object" + } + }, + "required": ["badgeSpecification", "content"] + } + } + } +} \ No newline at end of file From 25ff730371fe047ed7a86ec2decca16dafd1c686 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Sun, 23 Feb 2014 13:29:15 -0800 Subject: [PATCH 02/13] updated description to be get rid of inaccurate text I had copied in --- badgeExtensions-schema/schema-badgeClass.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index cb0bdc9..697d6e1 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "title" : "Open Badge BadgeClass Definition v1.1", - "description": "A suggested age or US grade range targeted by the described badge or learning experience. Use one or both options.", + "description": "A schematic defining how an issuer defines an open badge to issue to its users", "type": "object", "properties": { "name": { From e1d3388136302d82821599682a88080c77396fe4 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Mon, 10 Mar 2014 16:01:51 -0400 Subject: [PATCH 03/13] 2 spaces for tabs, renames extension object based on suggestions --- badgeExtensions-schema/badgeClass.json | 4 +- .../schema-age-target-v0.5.json | 28 +-- badgeExtensions-schema/schema-badgeClass.json | 172 +++++++++--------- 3 files changed, 102 insertions(+), 102 deletions(-) diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json index 3c344a8..a3f9f78 100644 --- a/badgeExtensions-schema/badgeClass.json +++ b/badgeExtensions-schema/badgeClass.json @@ -5,9 +5,9 @@ "criteria": "https://example.org/extended-badge.html", "tags": ["badgeClassExtensions"], "issuer": "https://example.org/organization.json", - "badgeClassExtensions": [ + "extensions": [ { - "badgeSpecification": { + "schema": { "title": "Badge Age Target", "reference": "http://this-domain.org/schema-age-target-v0.5.json", "version": "0.5" diff --git a/badgeExtensions-schema/schema-age-target-v0.5.json b/badgeExtensions-schema/schema-age-target-v0.5.json index 4dd45be..595b29a 100644 --- a/badgeExtensions-schema/schema-age-target-v0.5.json +++ b/badgeExtensions-schema/schema-age-target-v0.5.json @@ -1,16 +1,16 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title" : "Badge Age Target", - "description": "A suggested age or US grade range targeted by the described badge or learning experience. Use one or both options.", - "type": "object", - "properties": { - "age": { - "description": "The targeted age range for a badge or learning experience (e.g. '6-10')", - "type": "string" - }, - "grade": { - "description": "The targeted US grade range for a badge or learning experience (e.g. 'K-3')", - "type": "string" - } - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title" : "Badge Age Target", + "description": "A suggested age or US grade range targeted by the described badge or learning experience. Use one or both options.", + "type": "object", + "properties": { + "age": { + "description": "The targeted age range for a badge or learning experience (e.g. '6-10')", + "type": "string" + }, + "grade": { + "description": "The targeted US grade range for a badge or learning experience (e.g. 'K-3')", + "type": "string" + } + } } \ No newline at end of file diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index 697d6e1..b6c355b 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -1,88 +1,88 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title" : "Open Badge BadgeClass Definition v1.1", - "description": "A schematic defining how an issuer defines an open badge to issue to its users", - "type": "object", - "properties": { - "name": { - "description": "A name or title of the particular badge defined in the present badge class, which could then be issued to many recipients.", - "type": "string" - }, - "description": { - "description": "A short description of the achievement represented by the present badge.", - "type": "string" - }, - "image": { - "description": "The URL of the image that represents the present achievement. It will be baked into a complete badge for each recipient.", - "type": "string" - }, - "criteria": { - "description": "The URL of a human-readable page describing the URL of the criteria for earning the achievement. If the badge represents an educational achievement, consider marking up this up with LRMI.", - "type": "string" - }, - "issuer": { - "description": "URL of an object describing the organization that issued the badge. Endpoint should be JSON following the IssuerOrganization schema", - "type": "string" - }, - "tags": { - "description": "An array of text: List of tags that describe the type of achievement.", - "type": "array", - "items": { - "type": "string" - } - }, - "alignment": { - "description": "List of objects describing which educational standards this badge aligns to, if any. An array of AlignmentObjects.", - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "description": "Name of the alignment.", - "type": "string" - }, - "url": { - "description": "URL linking to the official description of the standard.", - "type": "string" - }, - "description": { - "description": "Short description of the standard.", - "type": "string" - } - }, - "required": ["name","url"] - } - }, - "badgeClassExtensions": { - "description": "An array of objects each linking to and fulfilling a schema for additional badge class information", - "type": "array", - "items": { - "type": "object", - "properties": { - "badgeSpecification": { - "type": "object", - "properties": { - "title": { - "description": "Short descriptive name of the extension that indicates what information it will add to the badgeClass.", - "type": "string" - }, - "reference": { - "description": "URL to the JSON-schema file defining the structure of this extension", - "type": "string" - }, - "version": { - "description": "Version string of the extension (is this necessary or should it be folded into the reference?)", - "type": "string" - } - }, - "required": ["reference"] - }, - "content": { - "type": "object" - } - }, - "required": ["badgeSpecification", "content"] - } - } - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title" : "Open Badge BadgeClass Definition v1.1", + "description": "A schematic defining how an issuer defines an open badge to issue to its users", + "type": "object", + "properties": { + "name": { + "description": "A name or title of the particular badge defined in the present badge class, which could then be issued to many recipients.", + "type": "string" + }, + "description": { + "description": "A short description of the achievement represented by the present badge.", + "type": "string" + }, + "image": { + "description": "The URL of the image that represents the present achievement. It will be baked into a complete badge for each recipient.", + "type": "string" + }, + "criteria": { + "description": "The URL of a human-readable page describing the criteria for earning the achievement. If the badge represents an educational achievement, consider marking up this up with LRMI.", + "type": "string" + }, + "issuer": { + "description": "URL of an object describing the organization that issued the badge. Endpoint should be JSON following the IssuerOrganization schema", + "type": "string" + }, + "tags": { + "description": "An array of text: List of tags that describe the type of achievement.", + "type": "array", + "items": { + "type": "string" + } + }, + "alignment": { + "description": "List of objects describing which educational standards this badge aligns to, if any. An array of AlignmentObjects.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "Name of the alignment.", + "type": "string" + }, + "url": { + "description": "URL linking to the official description of the standard.", + "type": "string" + }, + "description": { + "description": "Short description of the standard.", + "type": "string" + } + }, + "required": ["name","url"] + } + }, + "extensions": { + "description": "An array of objects each linking to and fulfilling a schema for additional badge class information", + "type": "array", + "items": { + "type": "object", + "properties": { + "schema": { + "type": "object", + "properties": { + "title": { + "description": "Short descriptive name of the extension that indicates what information it will add to the badgeClass.", + "type": "string" + }, + "reference": { + "description": "URL to the JSON-schema file defining the structure of this extension", + "type": "string" + }, + "version": { + "description": "Version string of the extension (is this necessary or should it be folded into the reference?)", + "type": "string" + } + }, + "required": ["reference"] + }, + "content": { + "type": "object" + } + }, + "required": ["schema", "content"] + } + } + } } \ No newline at end of file From 04019e77a5b9bac436741c1c1eb20e82e8d63c84 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Mon, 10 Mar 2014 17:41:10 -0400 Subject: [PATCH 04/13] adds checksum object with alg,hash properties to the badgeClass schema and its example --- badgeExtensions-schema/badgeClass.json | 6 +++++- badgeExtensions-schema/schema-badgeClass.json | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json index a3f9f78..6f3aa42 100644 --- a/badgeExtensions-schema/badgeClass.json +++ b/badgeExtensions-schema/badgeClass.json @@ -10,7 +10,11 @@ "schema": { "title": "Badge Age Target", "reference": "http://this-domain.org/schema-age-target-v0.5.json", - "version": "0.5" + "version": "0.5", + "checksum": { + "alg": "sha1", + "hash": "fakefakefakefake" + } }, "content": { "age": "5-18", diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index b6c355b..2ee00b2 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -73,6 +73,21 @@ "version": { "description": "Version string of the extension (is this necessary or should it be folded into the reference?)", "type": "string" + }, + "checksum": { + "description": "SHA-1 hash of the linked schema file so issuers may avoid downloading it repeatedly.", + "type": "object", + "properties": { + "alg": { + "description": "Hash algorithm. 'sha1' highly recommended", + "type": "string" + }, + "hash": { + "description": "string resulting from the hash of the schema file", + "type": "string" + } + }, + "required": ["alg", "hash"] } }, "required": ["reference"] From 7616aca54b9ea744fda84859f11d19cc5ccc38ac Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Mon, 10 Mar 2014 17:50:32 -0400 Subject: [PATCH 05/13] switched to a single field method for adding a checksum, string like alg --- badgeExtensions-schema/badgeClass.json | 5 +---- badgeExtensions-schema/schema-badgeClass.json | 15 ++------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json index 6f3aa42..013b674 100644 --- a/badgeExtensions-schema/badgeClass.json +++ b/badgeExtensions-schema/badgeClass.json @@ -11,10 +11,7 @@ "title": "Badge Age Target", "reference": "http://this-domain.org/schema-age-target-v0.5.json", "version": "0.5", - "checksum": { - "alg": "sha1", - "hash": "fakefakefakefake" - } + "checksum": "sha1$cafbfd764fcdab3c238234746cb32938cbffada3" }, "content": { "age": "5-18", diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index 2ee00b2..629de54 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -75,19 +75,8 @@ "type": "string" }, "checksum": { - "description": "SHA-1 hash of the linked schema file so issuers may avoid downloading it repeatedly.", - "type": "object", - "properties": { - "alg": { - "description": "Hash algorithm. 'sha1' highly recommended", - "type": "string" - }, - "hash": { - "description": "string resulting from the hash of the schema file", - "type": "string" - } - }, - "required": ["alg", "hash"] + "description": "SHA-1 hash of the linked schema file so issuers may avoid downloading it repeatedly. use format: alg$hash", + "type": "string", } }, "required": ["reference"] From b13d773973266dc8865519e27dfa2e1174e0f9a5 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Mon, 10 Mar 2014 19:04:13 -0400 Subject: [PATCH 06/13] added basic endorsement of a badgeclass based on signing an endorsement object that includes the badgeClassURL --- badgeExtensions-schema/badgeClass.json | 20 +++++++++ .../schema-badgeClass-endorsement.json | 45 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 badgeExtensions-schema/schema-badgeClass-endorsement.json diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json index 013b674..a072f98 100644 --- a/badgeExtensions-schema/badgeClass.json +++ b/badgeExtensions-schema/badgeClass.json @@ -18,5 +18,25 @@ "grade": "K-12" } }, + { + "schema": { + "title": "Badge Class Endorsement", + "reference": "http://example.org/schema-badgeClass-endorsement.json", + "version": "0.5", + "checksum": "sha1$abcdef1234567890abcdef1234567890abcdef12 " + }, + "content": { + "endorsement": { + "badgeClassURL": "http://example.org/badgeClass.json", + "endorserName": "Big University", + "endorserWebsite": "http://biguniversity.edu", + "endorserStatement": "This issuer issues badgeClass in a way that comports with our high standards." + }, + "verify": { + "url": "https://biguniversity.edu/public-key.key", + "signature": "algjwigel.weue8339dldififiwo.23dse39ew30ke02kdjfi02edjdle" + } + } + } ] } \ No newline at end of file diff --git a/badgeExtensions-schema/schema-badgeClass-endorsement.json b/badgeExtensions-schema/schema-badgeClass-endorsement.json new file mode 100644 index 0000000..f7c8b0c --- /dev/null +++ b/badgeExtensions-schema/schema-badgeClass-endorsement.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title" : "Badge Class Endorsement", + "description": "An outside endorsement of a badge and associated opportunities. The issuer may award this badge to many earners under this endorsement.", + "type": "object", + "properties": { + "endorsement": { + "description": "Collection of properties describing this endorsement.", + "type": "object", + "properties": { + "badgeClassURL": { + "description": "The URL of the badgeClass to be endorsed" + }, + "endorserName": { + "description": "The name of the party or organization endorsing this badge.", + "type": "string" + }, + "endorserWebsite": { + "description": "URL of the website associated with the endorser.", + "type": "string" + }, + "endorserStatement": { + "description": "Statement from the endorser about their endorsement decision.", + "type": "string" + } + }, + "required": ["badgeClassURL","endorserName","endorserWebsite"] + }, + "verify": { + "description": "Verification object containing the URL of the endorser's public key and a signature generated to match.", + "type": "object", + "properties": { + "url": { + "description": "URL of the hosted public key on the endorser's domain.", + "type": "string" + }, + "signature": { + "description": "JSON Web Signature tying the endorsement object of this badgeClass extension to the endorser via the endorser's key.", + "type": "string" + } + }, + "required": ["url","signature"] + } + } +} \ No newline at end of file From 8381011de7379e485a80d246540ccc15bb5fe576 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Mon, 10 Mar 2014 19:17:34 -0400 Subject: [PATCH 07/13] added a badgeClass object to endorsement so that signature can be deemed invalid if critical components of the badgeClass are changed. Don't know what to mark for requirements, should probably have oneOf badgeClassURL or badgeClass --- badgeExtensions-schema/badgeClass.json | 8 ++++++++ badgeExtensions-schema/schema-badgeClass-endorsement.json | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json index a072f98..05b8184 100644 --- a/badgeExtensions-schema/badgeClass.json +++ b/badgeExtensions-schema/badgeClass.json @@ -28,6 +28,14 @@ "content": { "endorsement": { "badgeClassURL": "http://example.org/badgeClass.json", + "badgeClass": { + "name": "Sample Extended Badge", + "description": "For doing awesome things in fairly standard ways.", + "image": "https://example.org/extended-badge-longcat.png", + "criteria": "https://example.org/extended-badge.html", + "tags": ["badgeClassExtensions"], + "issuer": "https://example.org/organization.json" + }, "endorserName": "Big University", "endorserWebsite": "http://biguniversity.edu", "endorserStatement": "This issuer issues badgeClass in a way that comports with our high standards." diff --git a/badgeExtensions-schema/schema-badgeClass-endorsement.json b/badgeExtensions-schema/schema-badgeClass-endorsement.json index f7c8b0c..6df8a33 100644 --- a/badgeExtensions-schema/schema-badgeClass-endorsement.json +++ b/badgeExtensions-schema/schema-badgeClass-endorsement.json @@ -9,7 +9,11 @@ "type": "object", "properties": { "badgeClassURL": { - "description": "The URL of the badgeClass to be endorsed" + "description": "The URL of the badgeClass to be endorsed", + "type": "string" + }, + "badgeClass": { + "$ref": "http://example.org/schema-badgeClass.json" }, "endorserName": { "description": "The name of the party or organization endorsing this badge.", @@ -24,7 +28,7 @@ "type": "string" } }, - "required": ["badgeClassURL","endorserName","endorserWebsite"] + "required": ["endorserName","endorserWebsite"] }, "verify": { "description": "Verification object containing the URL of the endorser's public key and a signature generated to match.", From 4cda677a32b30eca13f35e8545a6add2c854c969 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Mon, 10 Mar 2014 19:22:13 -0400 Subject: [PATCH 08/13] fixed schema-badgeClass-endrsement to have 2-space tabs --- .../schema-badgeClass-endorsement.json | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/badgeExtensions-schema/schema-badgeClass-endorsement.json b/badgeExtensions-schema/schema-badgeClass-endorsement.json index 6df8a33..0ee5cb7 100644 --- a/badgeExtensions-schema/schema-badgeClass-endorsement.json +++ b/badgeExtensions-schema/schema-badgeClass-endorsement.json @@ -1,49 +1,49 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title" : "Badge Class Endorsement", - "description": "An outside endorsement of a badge and associated opportunities. The issuer may award this badge to many earners under this endorsement.", - "type": "object", - "properties": { - "endorsement": { - "description": "Collection of properties describing this endorsement.", - "type": "object", - "properties": { - "badgeClassURL": { - "description": "The URL of the badgeClass to be endorsed", - "type": "string" - }, - "badgeClass": { - "$ref": "http://example.org/schema-badgeClass.json" - }, - "endorserName": { - "description": "The name of the party or organization endorsing this badge.", - "type": "string" - }, - "endorserWebsite": { - "description": "URL of the website associated with the endorser.", - "type": "string" - }, - "endorserStatement": { - "description": "Statement from the endorser about their endorsement decision.", - "type": "string" - } - }, - "required": ["endorserName","endorserWebsite"] - }, - "verify": { - "description": "Verification object containing the URL of the endorser's public key and a signature generated to match.", - "type": "object", - "properties": { - "url": { - "description": "URL of the hosted public key on the endorser's domain.", - "type": "string" - }, - "signature": { - "description": "JSON Web Signature tying the endorsement object of this badgeClass extension to the endorser via the endorser's key.", - "type": "string" - } - }, - "required": ["url","signature"] - } - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title" : "Badge Class Endorsement", + "description": "An outside endorsement of a badge and associated opportunities. The issuer may award this badge to many earners under this endorsement.", + "type": "object", + "properties": { + "endorsement": { + "description": "Collection of properties describing this endorsement.", + "type": "object", + "properties": { + "badgeClassURL": { + "description": "The URL of the badgeClass to be endorsed", + "type": "string" + }, + "badgeClass": { + "$ref": "http://example.org/schema-badgeClass.json" + }, + "endorserName": { + "description": "The name of the party or organization endorsing this badge.", + "type": "string" + }, + "endorserWebsite": { + "description": "URL of the website associated with the endorser.", + "type": "string" + }, + "endorserStatement": { + "description": "Statement from the endorser about their endorsement decision.", + "type": "string" + } + }, + "required": ["endorserName","endorserWebsite"] + }, + "verify": { + "description": "Verification object containing the URL of the endorser's public key and a signature generated to match.", + "type": "object", + "properties": { + "url": { + "description": "URL of the hosted public key on the endorser's domain.", + "type": "string" + }, + "signature": { + "description": "JSON Web Signature tying the endorsement object of this badgeClass extension to the endorser via the endorser's key.", + "type": "string" + } + }, + "required": ["url","signature"] + } + } } \ No newline at end of file From d0dede71147da1803ff746ad93bd9c323f08a2a0 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Wed, 12 Mar 2014 10:28:21 -0700 Subject: [PATCH 09/13] removed title and version properties from extension schema object --- badgeExtensions-schema/badgeClass.json | 4 +--- badgeExtensions-schema/schema-badgeClass.json | 8 -------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json index 013b674..66a2243 100644 --- a/badgeExtensions-schema/badgeClass.json +++ b/badgeExtensions-schema/badgeClass.json @@ -8,10 +8,8 @@ "extensions": [ { "schema": { - "title": "Badge Age Target", "reference": "http://this-domain.org/schema-age-target-v0.5.json", - "version": "0.5", - "checksum": "sha1$cafbfd764fcdab3c238234746cb32938cbffada3" + "checksum": "sha1$596d1c1c7ab83eed4f62f445fe2489086c6e3d36" }, "content": { "age": "5-18", diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index 629de54..d15dd50 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -62,18 +62,10 @@ "schema": { "type": "object", "properties": { - "title": { - "description": "Short descriptive name of the extension that indicates what information it will add to the badgeClass.", - "type": "string" - }, "reference": { "description": "URL to the JSON-schema file defining the structure of this extension", "type": "string" }, - "version": { - "description": "Version string of the extension (is this necessary or should it be folded into the reference?)", - "type": "string" - }, "checksum": { "description": "SHA-1 hash of the linked schema file so issuers may avoid downloading it repeatedly. use format: alg$hash", "type": "string", From feefc0a7f5f5a7fcd08963022a527165119057ae Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Sat, 22 Mar 2014 09:17:09 -0700 Subject: [PATCH 10/13] adds format:uri to badgeclass where needed --- badgeExtensions-schema/schema-badgeClass.json | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index d15dd50..c63f524 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -14,15 +14,18 @@ }, "image": { "description": "The URL of the image that represents the present achievement. It will be baked into a complete badge for each recipient.", - "type": "string" + "type": "string", + "format": "uri" }, "criteria": { "description": "The URL of a human-readable page describing the criteria for earning the achievement. If the badge represents an educational achievement, consider marking up this up with LRMI.", - "type": "string" + "type": "string", + "format": "uri" }, "issuer": { "description": "URL of an object describing the organization that issued the badge. Endpoint should be JSON following the IssuerOrganization schema", - "type": "string" + "type": "string", + "format": "uri" }, "tags": { "description": "An array of text: List of tags that describe the type of achievement.", @@ -43,14 +46,16 @@ }, "url": { "description": "URL linking to the official description of the standard.", - "type": "string" + "type": "string", + "format": "uri" }, "description": { "description": "Short description of the standard.", "type": "string" } }, - "required": ["name","url"] + "required": ["name","url"], + "additionalProperties": false } }, "extensions": { @@ -64,11 +69,12 @@ "properties": { "reference": { "description": "URL to the JSON-schema file defining the structure of this extension", - "type": "string" + "type": "string", + "format": "uri" }, "checksum": { "description": "SHA-1 hash of the linked schema file so issuers may avoid downloading it repeatedly. use format: alg$hash", - "type": "string", + "type": "string" } }, "required": ["reference"] From f6d2abe0eeb03d4ddcde7c6b24a83d1060895ced Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Sat, 22 Mar 2014 09:41:21 -0700 Subject: [PATCH 11/13] deletes errant comma making json invalid --- badgeExtensions-schema/badgeClass.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/badgeExtensions-schema/badgeClass.json b/badgeExtensions-schema/badgeClass.json index 66a2243..d996d7e 100644 --- a/badgeExtensions-schema/badgeClass.json +++ b/badgeExtensions-schema/badgeClass.json @@ -15,6 +15,6 @@ "age": "5-18", "grade": "K-12" } - }, + } ] } \ No newline at end of file From 61eeba7b298c51743c3fbcbf9eef5204cf2e7080 Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Sat, 22 Mar 2014 09:42:05 -0700 Subject: [PATCH 12/13] adds regex pattern for checksum to match, w/ escaped backslashes --- badgeExtensions-schema/schema-badgeClass.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index c63f524..09adc02 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -74,7 +74,8 @@ }, "checksum": { "description": "SHA-1 hash of the linked schema file so issuers may avoid downloading it repeatedly. use format: alg$hash", - "type": "string" + "type": "string", + "format": "^\\w+\\$\\w+$" } }, "required": ["reference"] From 02f55721752ad0932075c86d9902feb00ddb96df Mon Sep 17 00:00:00 2001 From: Nate Otto Date: Sat, 22 Mar 2014 09:46:26 -0700 Subject: [PATCH 13/13] corrects regex pattern for checksum to match, w/ escaped backslashes --- badgeExtensions-schema/schema-badgeClass.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/badgeExtensions-schema/schema-badgeClass.json b/badgeExtensions-schema/schema-badgeClass.json index 09adc02..861def2 100644 --- a/badgeExtensions-schema/schema-badgeClass.json +++ b/badgeExtensions-schema/schema-badgeClass.json @@ -75,7 +75,7 @@ "checksum": { "description": "SHA-1 hash of the linked schema file so issuers may avoid downloading it repeatedly. use format: alg$hash", "type": "string", - "format": "^\\w+\\$\\w+$" + "pattern": "^\\w+\\$\\w+$" } }, "required": ["reference"]