From 5c7d78c6263d2240e6ccdb1a930935416d5031d8 Mon Sep 17 00:00:00 2001 From: maxlivinci Date: Fri, 15 Nov 2024 16:11:22 -0800 Subject: [PATCH 1/3] refactor: add jsonld fields for karte_von_morgen-v1.0.0.json Signed-off-by: maxlivinci --- fields/context.json | 17 +++++++++++++++++ schemas/karte_von_morgen-v1.0.0.json | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 fields/context.json diff --git a/fields/context.json b/fields/context.json new file mode 100644 index 0000000..3d23ed9 --- /dev/null +++ b/fields/context.json @@ -0,0 +1,17 @@ +{ + "name": "JSON Schema for @context using ns.murmurations.network as base", + "description": "ns.murmurations.network is @base namespace", + "type": "object", + "additionalProperties": false, + "required": [ + "@vocab" + ], + "properties": { + "@vocab": { + "type": "string", + "format": "regex", + "pattern": "https://ns.murmurations.network/", + "description": "required: ns.murmurations.network is base ns" + } + } + } \ No newline at end of file diff --git a/schemas/karte_von_morgen-v1.0.0.json b/schemas/karte_von_morgen-v1.0.0.json index aa16b46..8bffa89 100644 --- a/schemas/karte_von_morgen-v1.0.0.json +++ b/schemas/karte_von_morgen-v1.0.0.json @@ -5,6 +5,20 @@ "description": "Entries (Initiatives, Organisations, Companies) from Kartevonmorgen.org", "type": "object", "properties": { + "@context": { + "$ref": "../fields/context.json" + }, + "@id": { + "type": "string", + "description": "required: The ID of the entity" + }, + "@type": { + "name": "The resource type", + "type": "string", + "description": "required: Organization", + "format": "regex", + "pattern": "Organization" + }, "linked_schemas": { "$ref": "../fields/linked_schemas.json" }, @@ -64,6 +78,8 @@ "schema": { "name": "karte_von_morgen-v1.0.0", "purpose": "Entries (Initiatives, Organisations, Companies) from Kartevonmorgen.org" - } + }, + "@type": "Organization", + "@context": "https://ns.murmurations.network/contexts/karte_von_morgen-v1.0.0.jsonld" } } From c3b86e5bb71ebc54b6fc02b1470f04684787d96d Mon Sep 17 00:00:00 2001 From: maxlivinci Date: Mon, 18 Nov 2024 08:24:28 -0800 Subject: [PATCH 2/3] refactor: update context.json Signed-off-by: maxlivinci --- fields/context.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/fields/context.json b/fields/context.json index 3d23ed9..752dc87 100644 --- a/fields/context.json +++ b/fields/context.json @@ -1,17 +1,17 @@ { - "name": "JSON Schema for @context using ns.murmurations.network as base", - "description": "ns.murmurations.network is @base namespace", - "type": "object", - "additionalProperties": false, - "required": [ - "@vocab" - ], - "properties": { - "@vocab": { - "type": "string", - "format": "regex", - "pattern": "https://ns.murmurations.network/", - "description": "required: ns.murmurations.network is base ns" - } + "name": "JSON Schema for @context using schema.org as base", + "description": "schema.org is @base namespace", + "type": "object", + "additionalProperties": true, + "required": [ + "@vocab" + ], + "properties": { + "@vocab": { + "type": "string", + "format": "regex", + "pattern": "https://schema.org/", + "description": "required: schema.org is base ns" } - } \ No newline at end of file + } +} \ No newline at end of file From e01eed4198998217add19dfbbb7c10ec2c553ac7 Mon Sep 17 00:00:00 2001 From: Geoff Turk Date: Mon, 18 Nov 2024 18:19:49 -0500 Subject: [PATCH 3/3] refactor: get @id from @context --- schemas/karte_von_morgen-v1.0.0.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/schemas/karte_von_morgen-v1.0.0.json b/schemas/karte_von_morgen-v1.0.0.json index 8bffa89..a6a57a4 100644 --- a/schemas/karte_von_morgen-v1.0.0.json +++ b/schemas/karte_von_morgen-v1.0.0.json @@ -8,11 +8,7 @@ "@context": { "$ref": "../fields/context.json" }, - "@id": { - "type": "string", - "description": "required: The ID of the entity" - }, - "@type": { + "@type": { "name": "The resource type", "type": "string", "description": "required: Organization",