diff --git a/schema/360-giving-package-schema.json b/schema/360-giving-package-schema.json index 1299e13b..8ba0331d 100644 --- a/schema/360-giving-package-schema.json +++ b/schema/360-giving-package-schema.json @@ -1,104 +1,116 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Schema for a 360Giving Data Grant Package", - "type": "object", - "required": ["grants"], - "properties": { - "grants": { - "title": "Grants", - "type": "array", - "minItems": 1, - "items": { "$ref": "https://raw.githubusercontent.com/ThreeSixtyGiving/standard/master/schema/360-giving-schema.json" }, - "uniqueItems": true + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Schema for a 360Giving Data Grant Package", + "type": "object", + "required": [ + "grants" + ], + "properties": { + "grants": { + "title": "Grants", + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://raw.githubusercontent.com/ThreeSixtyGiving/standard/master/schema/360-giving-schema.json" + }, + "uniqueItems": true + }, + "version": { + "title": "Version", + "description": "The version of the 360Giving schema used in this package, expressed as major.minor For example: 1.1", + "type": "string", + "pattern": "^(\\d+\\.)(\\d+)$" + }, + "title": { + "title": "Title", + "description": "The title of the 360Giving data package. Should be a human readable version of information contained in the filename of the data and should be unique ", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Full description of the information contained in the 360Giving data package.", + "type": "string" + }, + "issued": { + "title": "Issued", + "description": "The date that this data package was issued. The date must be written as YYYY-MM-DD, or in full date-time format", + "type": "string", + "oneOf": [ + { + "format": "date-time" }, - "version": { - "title": "Version", - "description": "The version of the 360Giving schema used in this package, expressed as major.minor For example: 1.1", - "type": "string", - "pattern": "^(\\d+\\.)(\\d+)$" - }, - "title": { - "title": "Title", - "description": "The title of the 360Giving data package. Should be a human readable version of information contained in the filename of the data and should be unique ", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Full description of the information contained in the 360Giving data package.", - "type": "string" - }, - "issued": { - "title": "Issued", - "description": "The date that this data package was issued. The date must be written as YYYY-MM-DD, or in full date-time format", - "type": "string", - "oneOf": [ - {"format": "date-time"}, - {"pattern":"^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"} - ] - }, - "modified": { - "title": "Modified", - "description": "The date that this data package was last modified. A full date-time format must be used.", - "type": "string", - "oneOf": [ - {"format": "date-time"}, - {"pattern":"^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"} - ] + { + "pattern": "^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$" + } + ] + }, + "modified": { + "title": "Modified", + "description": "The date that this data package was last modified. A full date-time format must be used.", + "type": "string", + "oneOf": [ + { + "format": "date-time" }, + { + "pattern": "^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$" + } + ] + }, + "identifier": { + "title": "Identifier", + "description": "A unique identifier for this data package. This should be unique for a particular publisher.", + "type": "string" + }, + "publisher": { + "title": "Publisher", + "description": "Information to uniquely identify the publisher of this package.", + "type": "object", + "required": [ + "name" + ], + "properties": { "identifier": { "title": "Identifier", - "description": "A unique identifier for this data package. This should be unique for a particular publisher.", + "description": "The organisation identifier as described by [Organisation Identifier Standard](https://standard.threesixtygiving.org/en/latest/technical/identifiers/#organisation-identifier)", "type": "string" }, - "publisher": { - "title": "Publisher", - "description": "Information to uniquely identify the publisher of this package.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "identifier": { - "title": "Identifier", - "description": "The organisation identifier as described by [Organisation Identifier Standard](https://standard.threesixtygiving.org/en/latest/technical/identifiers/#organisation-identifier)", - "type": "string" - }, - "name": { - "title": "Name", - "description": "The name of the entity responsible for publishing this data.", - "type": "string" - }, - "website": { - "title": "Website", - "description": "URL of the website of the publishing entity.", - "type": "string", - "format": "uri" - }, - "logo": { - "title": "Logo", - "description": "URL of the logo of the publishing entity.", - "type": "string", - "format": "uri" - } - } - }, - "downloadURL": { - "title": "Download URL", - "description": "URL of where this data package can be downloaded.", - "type": "string", - "format": "uri" + "name": { + "title": "Name", + "description": "The name of the entity responsible for publishing this data.", + "type": "string" }, - "accessURL": { - "title": "Access URL", - "description": "URL of the website where this data package can be found.", + "website": { + "title": "Website", + "description": "URL of the website of the publishing entity.", "type": "string", "format": "uri" }, - "license": { - "title": "License", - "description": "A link to the license that applies to the data in this package. A Public Domain Dedication or [Open Definition Conformant](http://opendefinition.org/licenses/) license is strongly recommended. The canonical URI of the license should be used. Documents linked from this file may be under other license conditions.", + "logo": { + "title": "Logo", + "description": "URL of the logo of the publishing entity.", "type": "string", "format": "uri" } + } + }, + "downloadURL": { + "title": "Download URL", + "description": "URL of where this data package can be downloaded.", + "type": "string", + "format": "uri" + }, + "accessURL": { + "title": "Access URL", + "description": "URL of the website where this data package can be found.", + "type": "string", + "format": "uri" + }, + "license": { + "title": "License", + "description": "A link to the license that applies to the data in this package. A Public Domain Dedication or [Open Definition Conformant](http://opendefinition.org/licenses/) license is strongly recommended. The canonical URI of the license should be used. Documents linked from this file may be under other license conditions.", + "type": "string", + "format": "uri" } + } } diff --git a/schema/360-giving-schema.json b/schema/360-giving-schema.json index 4dc37382..1bfb4cb7 100644 --- a/schema/360-giving-schema.json +++ b/schema/360-giving-schema.json @@ -888,19 +888,19 @@ "type": "object", "required": [ "id", - "name" + "name" ], "properties": { "id": { - "type": "string", - "description": "A unique identifier which identifies the person in the dataset", - "title": "Identifier" - }, - "name": { - "type": "string", - "description": "The Person's full name or a generic name such as \"Individual Recipient\" ", - "title": "Name" - } + "type": "string", + "description": "A unique identifier which identifies the person in the dataset", + "title": "Identifier" + }, + "name": { + "type": "string", + "description": "The Person's full name or a generic name such as \"Individual Recipient\" ", + "title": "Name" + } } }, "Organization": { @@ -1108,7 +1108,7 @@ "id", "title", "description", - "currency", + "currency", "amountAwarded", "awardDate", "recipientOrganization", @@ -1222,29 +1222,29 @@ "title": "To Individuals Details", "properties": { "primaryGrantReason": { - "type": "string", - "title": "Primary Grant Reason", - "description": "A code referring to the reason(s) for a grant to an individual. The value for this field should be drawn from the Grant to Individuals Reason codelist", - "codelist": "grantToIndividualsReason.csv", - "openCodelist": false - }, - "secondaryGrantReason": { - "type": "string", - "title": "Secondary Grant Reason", - "description": "A code referring to the reason(s) for a grant to an individual. The value for this field should be drawn from the Grant to Individuals Reason codelist", - "codelist": "grantToIndividualsReason.csv", - "openCodelist": false - }, - "grantPurpose": { - "type": "array", - "title": "Grant Purpose", - "description": "A code referring to the purpose(s) for a grant to an individual. The value(s) for this field should be drawn from the Grant to Individuals Purpose codelist", - "items": { - "type": "string", - "codelist": "grantToIndividualsPurpose.csv", - "openCodelist": false - } - } + "type": "string", + "title": "Primary Grant Reason", + "description": "A code referring to the reason(s) for a grant to an individual. The value for this field should be drawn from the Grant to Individuals Reason codelist", + "codelist": "grantToIndividualsReason.csv", + "openCodelist": false + }, + "secondaryGrantReason": { + "type": "string", + "title": "Secondary Grant Reason", + "description": "A code referring to the reason(s) for a grant to an individual. The value for this field should be drawn from the Grant to Individuals Reason codelist", + "codelist": "grantToIndividualsReason.csv", + "openCodelist": false + }, + "grantPurpose": { + "type": "array", + "title": "Grant Purpose", + "description": "A code referring to the purpose(s) for a grant to an individual. The value(s) for this field should be drawn from the Grant to Individuals Purpose codelist", + "items": { + "type": "string", + "codelist": "grantToIndividualsPurpose.csv", + "openCodelist": false + } + } } }, "recipientOrganization": {