Skip to content

Commit

Permalink
Hotfix: Schema, Example, and Context Fixes (#264)
Browse files Browse the repository at this point in the history
Fixing some category 2 errors:

* Fix error in context.json
* Fix various errors in json schemas and examples

---------

Co-authored-by: simantvermasap <[email protected]>
  • Loading branch information
sebbader-sap and simantvermasap authored Jun 19, 2024
1 parent b3ff872 commit 50f2a64
Show file tree
Hide file tree
Showing 46 changed files with 170 additions and 124 deletions.
39 changes: 21 additions & 18 deletions catalog/message/example/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,39 @@
],
"odrl:hasPolicy": [
{
"@id": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"@type": "odrl:Offer",
"dspace:providerId": "http://example.com/Provider",
"odrl:assigner": "http://example.com/Provider",
"odrl:permission": [
{
"odrl:action": "odrl:use",
"odrl:constraint": [
{
"odrl:leftOperand": "odrl:spatial",
"odrl:operator": "odrl:EQ",
"odrl:rightOperand": "odrl:EU"
"odrl:operator": "odrl:eq",
"odrl:rightOperand": "http://example.org/EU"
}
],
"odrl:duty": []
"odrl:duty": {
"odrl:action": "cc:Attribution"
}
}
],
"odrl:prohibition": [],
"odrl:obligation": []
]
}
],
"dcat:distribution": {
"@type": "dcat:Distribution",
"dct:format": "dspace:s3+push",
"dcat:accessService": [
{
"@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77",
"@type": "dcat:DataService",
"dcat:endpointURL": "https://provider-a.com/connector"
}
]
}
"dcat:distribution": [
{
"@type": "dcat:Distribution",
"dct:format": "dspace:s3+push",
"dcat:accessService": [
{
"@id": "urn:uuid:4aa2dcc8-4d2d-569e-d634-8394a8834d77",
"@type": "dcat:DataService",
"dcat:endpointURL": "https://provider-a.com/connector"
}
]
}
]
}
]
}
2 changes: 1 addition & 1 deletion catalog/message/example/dataset-request-message.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:DatasetRequestMessage",
"dspace:dataset": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88"
"dspace:dataset": "urn:uuid:3afeadd8-ed2d-569e-d634-8394a8836d57"
}
7 changes: 4 additions & 3 deletions catalog/message/example/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
"dcat:keyword": [
"traffic"
],
"odrl:hasPolicy": {
"odrl:hasPolicy": [ {
"@type": "odrl:Offer",
"@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a88",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:permission": [
{
"odrl:action": "odrl:use",
Expand All @@ -27,7 +28,7 @@
]
}
]
},
} ],
"dcat:distribution": [
{
"@type": "dcat:Distribution",
Expand All @@ -42,4 +43,4 @@
]
}
]
}
}
10 changes: 6 additions & 4 deletions catalog/message/schema/catalog-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "object",
"allOf": [
{
"$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/Dataset"
"$ref": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json#/definitions/AbstractDataset"
},
{
"properties": {
Expand Down Expand Up @@ -49,9 +49,11 @@
}
],
"required": [ "@context", "@type" ],
"not": {
"required": [ "odrl:hasPolicy" ]
}
"anyOf" : [
{
"not" : { "required" : [ "odrl:hasPolicy" ] }
}
]
}
}
}
12 changes: 10 additions & 2 deletions catalog/message/schema/dataset-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"$id": "https://w3id.org/dspace/2024/1/catalog/dataset-schema.json",
"definitions": {
"Dataset": {
"AbstractDataset": {
"type": "object",
"allOf": [
{
Expand All @@ -33,6 +33,14 @@
}
}
}
]
},
"Dataset": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/AbstractDataset"
}
],
"required": [
"odrl:hasPolicy"
Expand Down Expand Up @@ -164,4 +172,4 @@
"required": [ "@value", "@language" ]
}
}
}
}
3 changes: 1 addition & 2 deletions catalog/message/shape/dataset-request-message-shape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ dspace_shapes:DatasetRequestMessageShape
sh:property [
a sh:PropertyShape ;
sh:path dspace:dataset ;
sh:class dcat:Dataset ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:severity sh:Violation ;
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 ;
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 ;
] ;
.
8 changes: 4 additions & 4 deletions catalog/message/shape/dataset-shape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ dspace_shapes:DatasetShape
sh:property [
a sh:PropertyShape ;
sh:path dct:title ;
sh:datatype xsd:string ;
sh:datatype rdf:langString ;
sh:minCount 0;
sh:severity sh:Violation ;
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 ;
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 ;
] ;

sh:property [
a sh:PropertyShape ;
sh:path odrl:hasPolicy ;
sh:class odrl:Policy ;
sh:class odrl:Offer ;
sh:severity sh:Violation ;
sh:minCount 0;
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 ;
] ;

.
.
8 changes: 4 additions & 4 deletions catalog/message/shape/dcat-shapes.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,17 @@ dspace_shapes:DataServiceShape
sh:property [
a sh:PropertyShape ;
sh:path dcat:endpointDescription ;
sh:datatype xsd:string ;
sh:datatype xsd:anyURI ;
sh:severity sh:Violation ;
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 ;
] ;

sh:property [
a sh:PropertyShape ;
sh:path dcat:endpointURL ;
sh:datatype xsd:string ;
sh:datatype xsd:anyURI ;
sh:severity sh:Violation ;
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 ;
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 ;
] ;

sh:property [
Expand All @@ -264,4 +264,4 @@ dspace_shapes:DataServiceShape
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 ;
] ;

.
.
2 changes: 1 addition & 1 deletion common/schema/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"odrl:leftOperand": { "@type": "@id" },
"odrl:operator": { "@type": "@id" },
"odrl:rightOperandReference": { "@type": "@id" },
"odrl:profile": { "@container": "@set" }
"odrl:profile": { "@container": "@set" },
"odrl:assigner": { "@type": "@id" },
"odrl:assignee": { "@type": "@id" }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
}]
}]
},
"dspace:callbackAddress": "https://......"
"dspace:callbackAddress": "https://example.com/callback"
}
2 changes: 1 addition & 1 deletion negotiation/message/example/contract-offer-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
}]
}]
},
"dspace:callbackAddress": "https://......"
"dspace:callbackAddress": "https://example.com/callback"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"dspace:offer": {
"@type": "odrl:Offer",
"@id": "urn:uuid:d526561f-528e-4d5a-ae12-9a9dd9b7a518",
"target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88"
"odrl:assigner": "urn:tsdshhs636378",
"target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"odrl:permission": [{
"odrl:action": "odrl:use"
}]
},
"dspace:callbackAddress": "https://......"
"dspace:callbackAddress": "https://example.com/callback"
}
4 changes: 3 additions & 1 deletion negotiation/message/example/contract-request-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:offer": {
"@type": "odrl:Offer",
"@id": "urn:uuid:d526561f-528e-4d5a-ae12-9a9dd9b7a815",
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:assignee": "urn:jashd766",
Expand All @@ -16,5 +18,5 @@
}]
}]
},
"dspace:callbackAddress": "https://......"
"dspace:callbackAddress": "https://example.com/callback"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"dspace:offer": {
"@type": "odrl:Offer",
"@id": "urn:uuid:2828282:3dd1add8-4d2d-569e-d634-8394a8836a89",
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88"
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:permission": [{
"odrl:action": "odrl:use"
}]
},
"dspace:callbackAddress": "https://......"
"dspace:callbackAddress": "https://example.com/callback"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:agreement": {
"@id": "some-other-id",
"@id": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44",
"@type": "odrl:Agreement",
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"odrl:assignee": "...",
Expand Down Expand Up @@ -39,5 +39,6 @@
]
}
]
}
},
"dspace:callbackAddress": "https://example.com/callback"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"required": [ "@context", "@type", "dspace:providerPid", "dspace:offer", "dspace:callbackAddress" ]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"required": [ "@context", "@type", "dspace:consumerPid", "dspace:offer", "dspace:callbackAddress" ]
}
}
}
}
5 changes: 2 additions & 3 deletions negotiation/message/schema/contract-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
"odrl:assignee": {
"type": "string"
}
},
"not": { "required": [ "odrl:target" ] }
}
},
"MessageOffer": {
"type": "object",
Expand Down Expand Up @@ -153,7 +152,7 @@
"required": [
"@type",
"@id",
"@target",
"odrl:target",
"odrl:assignee",
"odrl:assigner"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ dspace_shapes:ContractAgreementMessageShape
sh:property [
a sh:PropertyShape ;
sh:path dspace:callbackAddress ;
sh:datatype xsd:string ;
sh:datatype xsd:anyURI ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/contract-agreement-message-shape.ttl> (ContractAgreementMessageShape): An dspace:callbackAddress property must point to exactly one xsd:string value."@en ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/contract-agreement-message-shape.ttl> (ContractAgreementMessageShape): An dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ;
]
.
4 changes: 2 additions & 2 deletions negotiation/message/shape/contract-offer-message-shape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ dspace_shapes:ContractOfferMessageShape
sh:property [
a sh:PropertyShape ;
sh:path dspace:callbackAddress ;
sh:datatype xsd:string ;
sh:datatype xsd:anyURI ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/contract-offer-message-shape.ttl> (ContractOfferMessageShape): A dspace:callbackAddress property must point to exactly one xsd:string value."@en ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/contract-offer-message-shape.ttl> (ContractOfferMessageShape): A dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ;
] ;
.
4 changes: 2 additions & 2 deletions negotiation/message/shape/contract-request-message-shape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ dspace_shapes:ContractRequestMessageShape
sh:property [
a sh:PropertyShape ;
sh:path dspace:callbackAddress ;
sh:datatype xsd:string ;
sh:datatype xsd:anyURI ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/contract-request-message-shape.ttl> (ContractRequestMessageShape): An dspace:callbackAddress property must point to exactly one xsd:string value."@en ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/contract-request-message-shape.ttl> (ContractRequestMessageShape): An dspace:callbackAddress property must point to exactly one xsd:anyURI value."@en ;
] ;
.
Loading

0 comments on commit 50f2a64

Please sign in to comment.