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/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/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", diff --git a/schemas/default-v2.1.0.json b/schemas/default-v2.1.0.json index a013a53..3cfaed8 100644 --- a/schemas/default-v2.1.0.json +++ b/schemas/default-v2.1.0.json @@ -2,48 +2,38 @@ "$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]$" + "pattern": "^[a-z@][a-z0-9_]{0,97}[a-z0-9]$" }, "properties": { "linked_schemas": { "$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" @@ -52,10 +42,7 @@ "$ref": "../fields/longitude.json" }, "expires": { - "type": "integer", - "description": "UNIX timestamp representing the expiration time", - "minimum": 1000000000, - "maximum": 9999999999 + "$ref": "../fields/expires.json" } }, "if": { @@ -81,8 +68,7 @@ "url": "https://murmurations.network" }, "schema": { - "name": "default-v2.1.0", - "url": "https://murmurations.network/schemas/default_schema" + "name": "default-v2.1.0" } } }