diff --git a/artifacts/src/main/resources/catalog/dataset-schema.json b/artifacts/src/main/resources/catalog/dataset-schema.json index 8191540..feb4a47 100644 --- a/artifacts/src/main/resources/catalog/dataset-schema.json +++ b/artifacts/src/main/resources/catalog/dataset-schema.json @@ -4,7 +4,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Dataset" + "$ref": "#/definitions/RootDataset" } ], "$id": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json", @@ -47,6 +47,22 @@ "distribution" ] }, + "RootDataset": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Dataset" + } + ], + "properties": { + "@context": { + "$ref": "https://w3id.org/dspace/2024/1/common/context-schema.json" + } + }, + "required": [ + "@context" + ] + }, "Resource": { "type": "object", "properties": { diff --git a/artifacts/src/test/java/org/eclipse/dsp/schema/catalog/DatasetSchemaTest.java b/artifacts/src/test/java/org/eclipse/dsp/schema/catalog/DatasetSchemaTest.java index 5318fe8..758c62c 100644 --- a/artifacts/src/test/java/org/eclipse/dsp/schema/catalog/DatasetSchemaTest.java +++ b/artifacts/src/test/java/org/eclipse/dsp/schema/catalog/DatasetSchemaTest.java @@ -35,6 +35,9 @@ void setUp() { private static final String DATASET = """ { + "@context": [ + "https://w3id.org/dspace/2024/1/context.json" + ], "@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88", "hasPolicy": [ {