SubscriptionRequest#includedSubscriptionEventType includes a singular string, when it should be an array of @id
Subscription requests created by NE:ONE include a singular string in property includedSubscriptionEventType. However, according to API specs and ontology(https://onerecord.iata.org/ns/api/index-en.html#includeSubscriptionEventType), it should be an array of @id.
This causes errors in parsing and handling subscription requests originating from NE:ONE.
NE:ONE:
{
"@id" : "neone:19a7f220-d1de-4dc9-ba73-9bad6733a924",
"@type" : "Subscription",
"hasDescription" : "some description",
"hasSubscriber" : {
"@id" : "http://localhost:3001/logistics-objects/_data-holder"
},
"hasSupportedContentType" : [ "application/ld+json", "application/x-turtle", "text/turtle" ],
"hasTopic" : "https://onerecord.iata.org/ns/cargo#Piece",
"hasTopicType" : {
"@id" : "https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_TYPE"
},
"includeSubscriptionEventType" : "https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_CREATED",
"sendLogisticsObjectBody" : {
"@type" : "http://www.w3.org/2001/XMLSchema#boolean",
"@value" : "true"
},
"@context" : {
"@vocab" : "https://onerecord.iata.org/ns/api#"
}
}
ONE Record API specs:
{
"@context": {
"cargo": "https://onerecord.iata.org/ns/cargo#",
"api": "https://onerecord.iata.org/ns/api#",
"publisher": "https://1r.example.com/",
"subscriber": "https://1r.example.com/"
},
"@id": "publisher:subscriptions/5f1a4869-e324-45b1-9ab0-60271ba54185",
"@type": "Subscription",
"api:contentType": "application/ld+json",
"api:hasSubscriber": {
"@id": "subscriber:logistics-objects/957e2622-9d31-493b-8b8f-3c805064dbda"
},
"api:includeSubscriptionEventType": [
{
"@id": "api:LOGISTICS_OBJECT_UPDATED"
},
{
"@id": "api:LOGISTICS_OBJECT_CREATED"
},
{
"@id": "api:LOGISTICS_EVENT_RECEIVED"
}
],
"api:hasTopicType": {
"@id": "api:LOGISTICS_OBJECT_TYPE"
},
"api:hasTopic": {
"@type": "http://www.w3.org/2001/XMLSchema#anyURI",
"@value": "https://onerecord.iata.org/ns/cargo#Shipment"
}
}