From e9cb5733f4d18858dea83e60cac4d9e979ec66ee Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Thu, 31 Oct 2024 15:08:34 +0100 Subject: [PATCH 1/5] fix: use integer type for Unix timestamps --- fields/date_added.json | 2 +- fields/ends_at.json | 2 +- fields/starts_at.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fields/date_added.json b/fields/date_added.json index 3b55ec3..3222603 100644 --- a/fields/date_added.json +++ b/fields/date_added.json @@ -1,7 +1,7 @@ { "title": "Date added", "description": "The date the entity was added (as a Unix timestamp, e.g., 1651848477)", - "type": "number", + "type": "integer", "metadata": { "creator": { "name": "Murmurations Network", diff --git a/fields/ends_at.json b/fields/ends_at.json index 7366573..4930c05 100644 --- a/fields/ends_at.json +++ b/fields/ends_at.json @@ -1,7 +1,7 @@ { "title": "End Date/Time", "description": "An ending date and time for an entity, event, etc. (as a Unix timestamp, e.g., 1651848477)", - "type": "number", + "type": "integer", "metadata": { "creator": { "name": "Murmurations Network", diff --git a/fields/starts_at.json b/fields/starts_at.json index f07db54..d4ee24d 100644 --- a/fields/starts_at.json +++ b/fields/starts_at.json @@ -1,7 +1,7 @@ { "title": "Start Date/Time", "description": "A starting date and time for an entity, event, etc. (as a Unix timestamp, e.g., 1651848477)", - "type": "number", + "type": "integer", "metadata": { "creator": { "name": "Murmurations Network", From 7da4f1dc9a1256a24224c18375c41bfe068f101a Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Thu, 31 Oct 2024 15:25:45 +0100 Subject: [PATCH 2/5] fix: move expires field into its own file --- fields/expires.json | 19 +++++++++++++++++++ schemas/default-v2.1.0.json | 5 +---- 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 fields/expires.json diff --git a/fields/expires.json b/fields/expires.json new file mode 100644 index 0000000..5d3afd3 --- /dev/null +++ b/fields/expires.json @@ -0,0 +1,19 @@ +{ + "title": "Expires", + "description": "An expiration date for the profile (as a Unix timestamp, e.g., 1651848477)", + "type": "integer", + "minimum": 1000000000, + "maximum": 9999999999, + "metadata": { + "creator": { + "name": "Murmurations Network", + "url": "https://murmurations.network" + }, + "field": { + "name": "expires", + "version": "1.0.0" + }, + "context": ["https://schema.org/expires"], + "purpose": "A profile can be automatically removed from the index after a given date/time. When the expiration time is reached the profile will be marked as deleted in the index, and eventually removed entirely." + } +} diff --git a/schemas/default-v2.1.0.json b/schemas/default-v2.1.0.json index a013a53..3501028 100644 --- a/schemas/default-v2.1.0.json +++ b/schemas/default-v2.1.0.json @@ -52,10 +52,7 @@ "$ref": "../fields/longitude.json" }, "expires": { - "type": "integer", - "description": "UNIX timestamp representing the expiration time", - "minimum": 1000000000, - "maximum": 9999999999 + "$ref": "../fields/expires.json" } }, "if": { From a36d8008a9acded7d64c232fa3df3a4e266760bd Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Thu, 31 Oct 2024 15:26:25 +0100 Subject: [PATCH 3/5] feat: allow @ in property names for @context and @type --- schemas/default-v2.1.0.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/default-v2.1.0.json b/schemas/default-v2.1.0.json index 3501028..cc7158a 100644 --- a/schemas/default-v2.1.0.json +++ b/schemas/default-v2.1.0.json @@ -5,7 +5,7 @@ "description": "The default schema used for initial validation of a profile by the Murmurations Index.", "type": "object", "propertyNames": { - "pattern": "^[a-z][a-z0-9_]{0,97}[a-z0-9]$" + "pattern": "^[a-z@][a-z0-9_]{0,97}[a-z0-9]$" }, "properties": { "linked_schemas": { From 65fe2f0c442f12e501d1ec093cf90821467c254f Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Thu, 31 Oct 2024 15:35:48 +0100 Subject: [PATCH 4/5] fix: update default schema description --- schemas/default-v2.1.0.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/schemas/default-v2.1.0.json b/schemas/default-v2.1.0.json index cc7158a..933fcfe 100644 --- a/schemas/default-v2.1.0.json +++ b/schemas/default-v2.1.0.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft-07/schema#", "$id": "https://test-library.murmurations.network/v2/schemas/default-v2.1.0", "title": "Default Schema", - "description": "The default schema used for initial validation of a profile by the Murmurations Index.", + "description": "The default schema used for initial validation of a profile by the index service. All fields that are indexed must be included in this schema.", "type": "object", "propertyNames": { "pattern": "^[a-z@][a-z0-9_]{0,97}[a-z0-9]$" @@ -78,8 +78,7 @@ "url": "https://murmurations.network" }, "schema": { - "name": "default-v2.1.0", - "url": "https://murmurations.network/schemas/default_schema" + "name": "default-v2.1.0" } } } From 5f857194cc71959c0add904f4ea71ca648dd2e8b Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Mon, 18 Nov 2024 17:16:31 -0500 Subject: [PATCH 5/5] chore: cleanup superflous descriptions --- schemas/default-v2.1.0.json | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/schemas/default-v2.1.0.json b/schemas/default-v2.1.0.json index 933fcfe..3cfaed8 100644 --- a/schemas/default-v2.1.0.json +++ b/schemas/default-v2.1.0.json @@ -12,38 +12,28 @@ "$ref": "../fields/linked_schemas.json" }, "country_iso_3166": { - "$ref": "../fields/country_iso_3166.json", - "title": "Country (2 letters)", - "description": "The two-letter country code according to the ISO 3166-1 standard where the group is located" + "$ref": "../fields/country_iso_3166.json" }, "country_name": { "$ref": "../fields/country_name.json" }, "geolocation": { - "$ref": "../fields/geolocation.json", - "title": "Geolocation Coordinates", - "description": "The geo-coordinates (latitude & longitude) of the primary location of the group" + "$ref": "../fields/geolocation.json" }, "locality": { - "$ref": "../fields/locality.json", - "title": "Locality", - "description": "The city or town where the group is located" + "$ref": "../fields/locality.json" }, "name": { "$ref": "../fields/name.json" }, "primary_url": { - "$ref": "../fields/primary_url.json", - "title": "Primary URL", - "description": "The unique and definitive website address for the group or person creating this opportunity" + "$ref": "../fields/primary_url.json" }, "region": { "$ref": "../fields/region.json" }, "tags": { - "$ref": "../fields/tags.json", - "title": "Tags/Type", - "description": "Use these for the business sector SIC code so the map can be filtered" + "$ref": "../fields/tags.json" }, "latitude": { "$ref": "../fields/latitude.json"