Skip to content

Commit 50f2a64

Browse files
Hotfix: Schema, Example, and Context Fixes (#264)
Fixing some category 2 errors: * Fix error in context.json * Fix various errors in json schemas and examples --------- Co-authored-by: simantvermasap <143084974+simantvermasap@users.noreply.github.com>
1 parent b3ff872 commit 50f2a64

File tree

46 files changed

+170
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+170
-124
lines changed

catalog/message/example/catalog.json

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,39 @@
3838
],
3939
"odrl:hasPolicy": [
4040
{
41+
"@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
4142
"@type": "odrl:Offer",
42-
"dspace:providerId": "http://example.com/Provider",
43+
"odrl:assigner": "http://example.com/Provider",
4344
"odrl:permission": [
4445
{
4546
"odrl:action": "odrl:use",
4647
"odrl:constraint": [
4748
{
4849
"odrl:leftOperand": "odrl:spatial",
49-
"odrl:operator": "odrl:EQ",
50-
"odrl:rightOperand": "odrl:EU"
50+
"odrl:operator": "odrl:eq",
51+
"odrl:rightOperand": "http://example.org/EU"
5152
}
5253
],
53-
"odrl:duty": []
54+
"odrl:duty": {
55+
"odrl:action": "cc:Attribution"
56+
}
5457
}
55-
],
56-
"odrl:prohibition": [],
57-
"odrl:obligation": []
58+
]
5859
}
5960
],
60-
"dcat:distribution": {
61-
"@type": "dcat:Distribution",
62-
"dct:format": "dspace:s3+push",
63-
"dcat:accessService": [
64-
{
65-
"@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77",
66-
"@type": "dcat:DataService",
67-
"dcat:endpointURL": "https://provider-a.com/connector"
68-
}
69-
]
70-
}
61+
"dcat:distribution": [
62+
{
63+
"@type": "dcat:Distribution",
64+
"dct:format": "dspace:s3+push",
65+
"dcat:accessService": [
66+
{
67+
"@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77",
68+
"@type": "dcat:DataService",
69+
"dcat:endpointURL": "https://provider-a.com/connector"
70+
}
71+
]
72+
}
73+
]
7174
}
7275
]
7376
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"@context": "https://w3id.org/dspace/2024/1/context.json",
33
"@type": "dspace:DatasetRequestMessage",
4-
"dspace:dataset": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88"
4+
"dspace:dataset": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57"
55
}

catalog/message/example/dataset.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
"dcat:keyword": [
1313
"traffic"
1414
],
15-
"odrl:hasPolicy": {
15+
"odrl:hasPolicy": [ {
1616
"@type": "odrl:Offer",
1717
"@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88",
18+
"odrl:assigner": "urn:tsdshhs636378",
1819
"odrl:permission": [
1920
{
2021
"odrl:action": "odrl:use",
@@ -27,7 +28,7 @@
2728
]
2829
}
2930
]
30-
},
31+
} ],
3132
"dcat:distribution": [
3233
{
3334
"@type": "dcat:Distribution",
@@ -42,4 +43,4 @@
4243
]
4344
}
4445
]
45-
}
46+
}

catalog/message/schema/catalog-schema.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "object",
1414
"allOf": [
1515
{
16-
"$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/Dataset"
16+
"$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/AbstractDataset"
1717
},
1818
{
1919
"properties": {
@@ -49,9 +49,11 @@
4949
}
5050
],
5151
"required": [ "@context", "@type" ],
52-
"not": {
53-
"required": [ "odrl:hasPolicy" ]
54-
}
52+
"anyOf" : [
53+
{
54+
"not" : { "required" : [ "odrl:hasPolicy" ] }
55+
}
56+
]
5557
}
5658
}
5759
}

catalog/message/schema/dataset-schema.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"$id": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json",
1111
"definitions": {
12-
"Dataset": {
12+
"AbstractDataset": {
1313
"type": "object",
1414
"allOf": [
1515
{
@@ -33,6 +33,14 @@
3333
}
3434
}
3535
}
36+
]
37+
},
38+
"Dataset": {
39+
"type": "object",
40+
"allOf": [
41+
{
42+
"$ref": "#/definitions/AbstractDataset"
43+
}
3644
],
3745
"required": [
3846
"odrl:hasPolicy"
@@ -164,4 +172,4 @@
164172
"required": [ "@value", "@language" ]
165173
}
166174
}
167-
}
175+
}

catalog/message/shape/dataset-request-message-shape.ttl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ dspace_shapes:DatasetRequestMessageShape
3232
sh:property [
3333
a sh:PropertyShape ;
3434
sh:path dspace:dataset ;
35-
sh:class dcat:Dataset ;
3635
sh:minCount 1 ;
3736
sh:maxCount 1 ;
3837
sh:severity sh:Violation ;
39-
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/catalog-request-message-shape.ttl> (DatasetRequestMessage): An dspace:dataset property must point to one dcat:Dataset."@en ;
38+
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-request-message-shape.ttl> (DatasetRequestMessage): There must be exactly one dspace:dataset property."@en ;
4039
] ;
4140
.

catalog/message/shape/dataset-shape.ttl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ dspace_shapes:DatasetShape
6060
sh:property [
6161
a sh:PropertyShape ;
6262
sh:path dct:title ;
63-
sh:datatype xsd:string ;
63+
sh:datatype rdf:langString ;
6464
sh:minCount 0;
6565
sh:severity sh:Violation ;
66-
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (DatasetShape): A dct:title property must point to a xsd:string field."@en ;
66+
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (DatasetShape): A dct:title property must point to a language tagged field."@en ;
6767
] ;
6868

6969
sh:property [
7070
a sh:PropertyShape ;
7171
sh:path odrl:hasPolicy ;
72-
sh:class odrl:Policy ;
72+
sh:class odrl:Offer ;
7373
sh:severity sh:Violation ;
7474
sh:minCount 0;
7575
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dataset-shape.ttl> (DatasetShape): An odrl:hasPolicy property must point to an odrl:Policy."@en ;
7676
] ;
7777

78-
.
78+
.

catalog/message/shape/dcat-shapes.ttl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,17 @@ dspace_shapes:DataServiceShape
242242
sh:property [
243243
a sh:PropertyShape ;
244244
sh:path dcat:endpointDescription ;
245-
sh:datatype xsd:string ;
245+
sh:datatype xsd:anyURI ;
246246
sh:severity sh:Violation ;
247247
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dcat-shapes.ttl> (DataServiceShape): A dcat:endpointDescription property must point to a xsd:string field."@en ;
248248
] ;
249249

250250
sh:property [
251251
a sh:PropertyShape ;
252252
sh:path dcat:endpointURL ;
253-
sh:datatype xsd:string ;
253+
sh:datatype xsd:anyURI ;
254254
sh:severity sh:Violation ;
255-
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dcat-shapes.ttl> (DataServiceShape): A dcat:endpointURL property must point to a xsd:string field."@en ;
255+
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dcat-shapes.ttl> (DataServiceShape): A dcat:endpointURL property must point to a xsd:anyURI field."@en ;
256256
] ;
257257

258258
sh:property [
@@ -264,4 +264,4 @@ dspace_shapes:DataServiceShape
264264
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/dcat-shapes.ttl> (DataServiceShape): A dcat:servesDataset property must point to a dcat:Dataset."@en ;
265265
] ;
266266

267-
.
267+
.

common/schema/context.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"odrl:leftOperand": { "@type": "@id" },
5656
"odrl:operator": { "@type": "@id" },
5757
"odrl:rightOperandReference": { "@type": "@id" },
58-
"odrl:profile": { "@container": "@set" }
58+
"odrl:profile": { "@container": "@set" },
5959
"odrl:assigner": { "@type": "@id" },
6060
"odrl:assignee": { "@type": "@id" }
6161
}

negotiation/message/example/contract-agreement-message.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
}]
2020
}]
2121
},
22-
"dspace:callbackAddress": "https://......"
22+
"dspace:callbackAddress": "https://example.com/callback"
2323
}

0 commit comments

Comments
 (0)