From 3648c02c0eff98f17fc5ce61f70c26f17c39cce2 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 21 Aug 2018 12:42:41 +0100 Subject: [PATCH 1/2] Reformat the 360Giving schema (By running `update_currency_codes.py` with no new entries). --- schema/360-giving-schema.json | 59 ++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/schema/360-giving-schema.json b/schema/360-giving-schema.json index 265a8ab2..f9a5450b 100644 --- a/schema/360-giving-schema.json +++ b/schema/360-giving-schema.json @@ -322,8 +322,12 @@ }, "transactionDate": { "oneOf": [ - {"format": "date-time"}, - {"pattern":"^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"} + { + "format": "date-time" + }, + { + "pattern": "^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$" + } ], "type": "string", "description": "When did this transaction take place? The date should be written as YYYY-MM-DD, or in full date-time format.", @@ -341,8 +345,12 @@ }, "valueDate": { "oneOf": [ - {"format": "date-time"}, - {"pattern":"^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"} + { + "format": "date-time" + }, + { + "pattern": "^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$" + } ], "type": [ "string", @@ -1017,16 +1025,21 @@ "properties": { "title": { "type": "string", - "title":"Title", + "title": "Title", "description": "The title of this event", - "weight": 1.05, - "title": "Title" + "weight": 1.05 }, "startDate": { "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]))?$"} + { + "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]))?$" + } ], "type": "string", "description": "All events should have a start date. Dates should be in YYYY-MM-DD or date-time format. If the month or day are not available, these may be omitted.", @@ -1035,9 +1048,15 @@ }, "endDate": { "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]))?$"} + { + "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]))?$" + } ], "type": "string", "description": "An end date for the grant. Dates should be in YYYY-MM-DD or date-time format. If the month or day are not available, these may be omitted.", @@ -1119,8 +1138,12 @@ }, "awardDate": { "oneOf": [ - {"format": "date-time"}, - {"pattern":"^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"} + { + "format": "date-time" + }, + { + "pattern": "^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$" + } ], "type": "string", "description": "When was the decision to award this grant made. The date should be written as YYYY-MM-DD, or in full date-time format.", @@ -1141,7 +1164,7 @@ "type": "array", "weight": 5.041, "title": "Planned Dates", - "description":"When the recipient organisation intends this activity to take place. A date range can include a start date and duration in months, or a start and end date.", + "description": "When the recipient organisation intends this activity to take place. A date range can include a start date and duration in months, or a start and end date.", "rollUp": [ "startDate", "endDate", @@ -1165,7 +1188,7 @@ "type": "array", "weight": 5, "title": "Recipient Org", - "description":"Details of the recipient of this grant.", + "description": "Details of the recipient of this grant.", "rollUp": [ "id", "name", @@ -1314,4 +1337,4 @@ "title": "Data Source" } } -} +} \ No newline at end of file From eb8f56de3a26360a979b12ccc8f90881cc12ba51 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Tue, 21 Aug 2018 12:43:20 +0100 Subject: [PATCH 2/2] Add VES currency code https://www.currency-iso.org/dam/downloads/dl_currency_iso_amendment_168.pdf --- schema/360-giving-schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schema/360-giving-schema.json b/schema/360-giving-schema.json index f9a5450b..5d74a9aa 100644 --- a/schema/360-giving-schema.json +++ b/schema/360-giving-schema.json @@ -267,6 +267,7 @@ "UZS", "VEB", "VEF", + "VES", "VNC", "VND", "VUV",