AutoAcceptSubscriptionProposal should not accept Non-LogisticsObjects
If auto-accept-subscription-proposals=true
, the following request:
GET http://localhost:8080/subscriptions?topicType=https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_TYPE&topic=https://onerecord.iata.org/ns/cargo%23Value
should return
HTTP/1.1 400 Bad Request
Content-Type: application/ld+json; version=2.0.0-dev
Content-Language: en-US
{
"@context": {
"api": "https://onerecord.iata.org/ns/api#",
"@language": "en-US"
},
"@type": "api:Error",
"@id": "_:b0",
"api:hasTitle": "Logistics Object Type not supported",
"api:hasErrorDetail": [{
"@type": "api:ErrorDetails",
"@id": "_:b1",
"api:hasCode": "400",
"api:hasMessage": "Provided Logistics Object Type is not supported"
}]
}
ne-one server should check if the provided topic query parameter is a LogisticsObject data class.
see also #188