diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot index 5b3e2eb284a1774f44b988a117694b4699d457e6..885ebb79ab36c6fa6f87f8b90fec9028e3a88582 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_10.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation The Notification content shall be JSON by default. +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource Resource ${EXECDIR}/resources/AssertionUtils.resource @@ -18,7 +19,6 @@ ${building_id_prefix} urn:ngsi-ld:Building: ${entity_building_filepath} building-simple-attributes.jsonld ${fragment_filename} airQualityLevel-fragment.jsonld ${notification_server_send_url} http://${notification_server_host}:${notification_server_port}/notify -${expected_header_links} <${ngsild_test_suite_context}>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json" *** Test Cases *** @@ -30,7 +30,8 @@ ${expected_header_links} <${ngsild_test_suite_context}>; rel="htt ${notification} ${headers}= Wait for notification timeout=${10} - Dictionary Should Contain Item ${headers} Link ${expected_header_links} + ${expected_header_link}= Build Context Link ${ngsild_test_suite_context} + Dictionary Should Contain Item ${headers} Link ${expected_header_link} Dictionary Should Not Contain Key ${notification}[data][0] @context diff --git a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot index 8e0dfe804c01304dfb989074b38028df2c5e3a19..060950e4f1ea1edba9e6418a30ae9e3be3a18f96 100644 --- a/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot +++ b/TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot @@ -1,6 +1,7 @@ *** Settings *** Documentation Check that one can retrieve a context source registration subscription +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistrationSubscription.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -23,11 +24,7 @@ ${expectation_file_path}= csourceSubscriptions/expectations/subscr ... subscription_id=${subscription_id} ... context=${ngsild_test_suite_context} - ${expected_link_header}= CATENATE - ... SEPARATOR= - ... < - ... ${ngsild_test_suite_context} - ... >; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json" + ${expected_link_header}= Build Context Link ${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Reason set to ${response.reason} OK diff --git a/resources/ApiUtils/Common.resource b/resources/ApiUtils/Common.resource index 7d55b8eb6b7e39826b883a3e817fa0e4b7071d31..0626613ef17efaf226cbe9b10220feb6ffa0abfb 100644 --- a/resources/ApiUtils/Common.resource +++ b/resources/ApiUtils/Common.resource @@ -3,3 +3,9 @@ ${BUILDING_ID_PREFIX} urn:ngsi-ld:Building: ${BUS_ID_PREFIX} urn:ngsi-ld:Bus: ${CITY_ID_PREFIX} urn:ngsi-ld:City: ${VEHICLE_ID_PREFIX} urn:ngsi-ld:Vehicle: + + +*** Keywords *** +Build Context Link + [Arguments] ${context} + RETURN <${context}>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json" diff --git a/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index bb03910bd5a02283d4611c96f0234282524a4ad3..4dce6bb76ef2d864ee523e8ed8177b77f3a34eaa 100755 --- a/resources/ApiUtils/ContextInformationConsumption.resource +++ b/resources/ApiUtils/ContextInformationConsumption.resource @@ -4,6 +4,7 @@ Library ${EXECDIR}/libraries/logUtils.py Library Collections Library OperatingSystem Library RequestsLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource *** Variables *** @@ -54,9 +55,10 @@ Query Entities Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF ${attrs_length}>0 Set To Dictionary ${params} attrs=${attrs} IF '${geoproperty}'!='' @@ -106,9 +108,10 @@ Query Entities Via POST Set To Dictionary ${headers} Content-Type ${content_type} Set To Dictionary ${headers} Accept ${accept} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END &{body}= Create Dictionary Set To Dictionary ${body} type=Query @@ -148,9 +151,10 @@ Query Entity Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF ${attrs_length}>0 Set To Dictionary ${params} attrs=${attrs} IF '${geometryProperty}'!='' @@ -177,9 +181,10 @@ Retrieve Attribute Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= GET ... url=${url}/${ATTRIBUTES_ENDPOINT_PATH}/${attribute_name} @@ -197,9 +202,10 @@ Retrieve Attributes Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END Set To Dictionary ${params} details=${details} ${response}= GET @@ -222,9 +228,10 @@ Retrieve Entity by Id ${options_length}= Get Length ${options} Set To Dictionary ${headers} Accept ${accept} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF '${local}'!='' Set To Dictionary ${params} local=${local} IF ${options_length}>0 @@ -246,9 +253,10 @@ Retrieve Entity Type Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= GET ... url=${url}/${ENTITIES_TYPES_ENDPOINT_PATH}/${type} @@ -266,9 +274,10 @@ Retrieve Entity Types Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END Set To Dictionary ${params} details=${details} ${response}= GET diff --git a/resources/ApiUtils/ContextInformationProvision.resource b/resources/ApiUtils/ContextInformationProvision.resource index fea283f78d079290e910acdd0541e547d13dcb2e..4d797536555c149d8abcd1099190cb1779bfc001 100755 --- a/resources/ApiUtils/ContextInformationProvision.resource +++ b/resources/ApiUtils/ContextInformationProvision.resource @@ -5,6 +5,7 @@ Library RequestsLibrary Library OperatingSystem Library Collections Library JSONLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -74,9 +75,10 @@ Batch Create Entities Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= POST ... url=${url}/${BATCH_CREATE_ENDPOINT_PATH} @@ -188,9 +190,10 @@ Create Entity Selecting Content Type Set To Dictionary ${headers} Accept=${accept} END IF '${context}'!='${EMPTY}' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= POST ... url=${url}/${ENTITIES_ENDPOINT_PATH} @@ -216,9 +219,10 @@ Delete Entity Attributes [Arguments] ${entityId} ${attributeId} ${datasetId} ${deleteAll} ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${CONTENT_TYPE_JSON} IF '${context}'!='${EMPTY}' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END @{params}= Create List IF '${datasetId}'!='' @@ -259,9 +263,10 @@ Partial Update Entity Attributes Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${fragment_payload}= Load JSON From File ${EXECDIR}/data/entities/fragmentEntities/${fragment_filename} ${response}= PATCH @@ -295,9 +300,10 @@ Replace Entity ... entity_id=${entity_id} &{headers}= Create Dictionary Content-Type=${content_type} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= PUT ... url=${url}/${ENTITIES_ENDPOINT_PATH}${entity_id} @@ -315,9 +321,10 @@ Replace Entity Selecting Content Type ... ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= PUT ... url=${url}/${ENTITIES_ENDPOINT_PATH}${entity_id} @@ -337,9 +344,10 @@ Merge Entity ${entity}= Update Value To JSON ${entity_payload} $.id ${entity_id} &{headers}= Create Dictionary Content-Type=${content_type} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= PATCH ... url=${url}/${ENTITIES_ENDPOINT_PATH}${entity_id} @@ -358,9 +366,10 @@ Replace Attribute Selecting Content Type ... ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= PUT ... url=${url}/${ENTITIES_ENDPOINT_PATH}${entity_id}/attrs/${attr_id} diff --git a/resources/ApiUtils/ContextInformationSubscription.resource b/resources/ApiUtils/ContextInformationSubscription.resource index d6b1752614d62ba9671f6901e1515bb9a938ca72..9a2672f55218ade98a8efc1373890d3ec8aced50 100755 --- a/resources/ApiUtils/ContextInformationSubscription.resource +++ b/resources/ApiUtils/ContextInformationSubscription.resource @@ -5,6 +5,7 @@ Library Collections Library JSONLibrary Library OperatingSystem Library RequestsLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource *** Variables *** @@ -36,9 +37,10 @@ Create Subscription Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${subscription_payload}= Load JSON From File ${EXECDIR}/data/${filename_path} ${subscription}= Update Value To JSON ${subscription_payload} $..id ${subscription_id} @@ -73,9 +75,10 @@ Create Subscription From Subscription Payload Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= POST ... url=${url}/${SUBSCRIPTION_ENDPOINT_PATH} @@ -99,9 +102,10 @@ Query Subscriptions &{headers}= Create Dictionary &{params}= Create Dictionary IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF '${limit}'!='' Set To Dictionary ${params} limit=${limit} IF '${offset}'!='' Set To Dictionary ${params} offset=${offset} @@ -125,9 +129,10 @@ Retrieve Subscription Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= GET @@ -149,9 +154,10 @@ Update Subscription Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${subscription_update_fragment}= Load JSON From File ${EXECDIR}/data/${fragment_filename} ${response}= PATCH @@ -169,9 +175,10 @@ Update Subscription With Payload Set To Dictionary ${headers} Accept ${accept} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= PATCH ... url=${url}/${SUBSCRIPTION_ENDPOINT_PATH}${subscription_id} diff --git a/resources/ApiUtils/ContextSourceDiscovery.resource b/resources/ApiUtils/ContextSourceDiscovery.resource index 160f66f9cd5a7ff9334fbc14c4717522c25199a9..a8127641625c18dc7fdae850e1e677dfad67ec94 100755 --- a/resources/ApiUtils/ContextSourceDiscovery.resource +++ b/resources/ApiUtils/ContextSourceDiscovery.resource @@ -3,6 +3,7 @@ Variables ${EXECDIR}/resources/variables.py Library ${EXECDIR}/libraries/logUtils.py Library Collections Library RequestsLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource *** Variables *** @@ -38,9 +39,10 @@ Query Context Source Registrations &{headers}= Create Dictionary &{params}= Create Dictionary IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF '${accept}'!='' Set To Dictionary ${headers} Accept=${accept} IF '${id}'!='' Set To Dictionary ${params} id=${id} @@ -100,9 +102,10 @@ Query Context Source Registrations With Return &{headers}= Create Dictionary &{params}= Create Dictionary IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF '${accept}'!='' Set To Dictionary ${headers} Accept ${accept} @@ -145,9 +148,10 @@ Retrieve Context Source Registration &{headers}= Create Dictionary IF '${accept}'!='' Set To Dictionary ${headers} Accept=${accept} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= GET ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${context_source_registration_id} diff --git a/resources/ApiUtils/ContextSourceRegistration.resource b/resources/ApiUtils/ContextSourceRegistration.resource index 165144f7f2d247cc43f76a69bdff1494a0fb78a7..827ceb17fd92cf032f270f8a62dd369790ffaa4e 100755 --- a/resources/ApiUtils/ContextSourceRegistration.resource +++ b/resources/ApiUtils/ContextSourceRegistration.resource @@ -5,6 +5,7 @@ Library Collections Library OperatingSystem Library JSONLibrary Library RequestsLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource *** Variables *** @@ -67,9 +68,10 @@ Create Context Source Registration With Return Set To Dictionary ${headers} Accept=${context} END IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= POST ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH} diff --git a/resources/ApiUtils/ContextSourceRegistrationSubscription.resource b/resources/ApiUtils/ContextSourceRegistrationSubscription.resource index 46e67e9815a707554401bdae2faf1c6dbbca2bd7..d9eec0ef8a10d3bb5c17000a973219c516698ef9 100755 --- a/resources/ApiUtils/ContextSourceRegistrationSubscription.resource +++ b/resources/ApiUtils/ContextSourceRegistrationSubscription.resource @@ -4,6 +4,7 @@ Library ${EXECDIR}/libraries/logUtils.py Library Collections Library OperatingSystem Library RequestsLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource *** Variables *** @@ -51,9 +52,10 @@ Query Context Source Registration Subscriptions &{params}= Create Dictionary IF '${accept}'!='' Set To Dictionary ${headers} Accept=${accept} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF '${limit}'!='' Set To Dictionary ${params} limit=${limit} IF '${page}'!='' Set To Dictionary ${params} page=${page} @@ -72,9 +74,10 @@ Retrieve Context Source Registration Subscription &{headers}= Create Dictionary Set To Dictionary ${headers} Accept ${accept} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= GET ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_SUBSCRIPTION_ENDPOINT_PATH}/${subscription_id} diff --git a/resources/ApiUtils/TemporalContextInformationConsumption.resource b/resources/ApiUtils/TemporalContextInformationConsumption.resource index 5b7328b720a4e2ecc492601b56b1ecaa057fc7fd..6075cad5db49e135eb28067fa703c04f4c6ebd9d 100755 --- a/resources/ApiUtils/TemporalContextInformationConsumption.resource +++ b/resources/ApiUtils/TemporalContextInformationConsumption.resource @@ -4,6 +4,7 @@ Library ${EXECDIR}/libraries/logUtils.py Library Collections Library JSONLibrary Library RequestsLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource *** Variables *** @@ -48,9 +49,10 @@ Query Temporal Representation Of Entities &{params}= Create Dictionary IF $accept!='' Set To Dictionary ${headers} Accept=${accept} IF $context!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF ${entity_types_length}>0 Set To Dictionary ${params} type=${entity_types} @@ -104,9 +106,10 @@ Query Temporal Representation Of Entities Via Post ${headers}= Create Dictionary Set To Dictionary ${headers} Content-Type ${content_type} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${query_payload}= Load JSON From File ${EXECDIR}/data/temporalEntities/${query_file_name} ${response}= POST @@ -142,9 +145,10 @@ Query Temporal Representation Of Entities With Return &{params}= Create Dictionary IF '${accept}'!='' Set To Dictionary ${headers} Accept=${accept} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF ${entity_types_length}>0 Set To Dictionary ${params} type=${entity_types} @@ -206,9 +210,10 @@ Retrieve Temporal Representation Of Entity IF '${accept}'!='' Set To Dictionary ${headers} Accept=${accept} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END IF ${attrs_length}>0 Set To Dictionary ${params} attrs=${attrs} IF ${options_length}>0 diff --git a/resources/ApiUtils/TemporalContextInformationProvision.resource b/resources/ApiUtils/TemporalContextInformationProvision.resource index db80955d077772d1354409086b36325ebebeb799..92a89e86da85c239a9a7ffa2519da7a208ae275d 100755 --- a/resources/ApiUtils/TemporalContextInformationProvision.resource +++ b/resources/ApiUtils/TemporalContextInformationProvision.resource @@ -5,6 +5,7 @@ Library Collections Library JSONLibrary Library OperatingSystem Library RequestsLibrary +Resource ${EXECDIR}/resources/ApiUtils/Common.resource *** Variables *** @@ -91,9 +92,10 @@ Delete Attribute From Temporal Entity ... ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END @{params}= Create List IF '${datasetId}'!='' @@ -114,9 +116,10 @@ Delete Attribute Instance From Temporal Entity [Arguments] ${temporal_entity_id} ${attributeId} ${instanceId} ${content_type} ${context}=${EMPTY} &{headers}= Create Dictionary IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${response}= DELETE ... url=${url}/${TEMPORAL_ENTITIES_ENDPOINT_PATH}/${temporal_entity_id}/attrs/${attributeId}/${instanceId} @@ -152,9 +155,10 @@ Modify Attribute Instance From Temporal Entity ... ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} IF '${context}'!='' + ${context_link}= Build Context Link ${context} Set To Dictionary ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + ... Link=${context_link} END ${fragment_payload}= Load JSON From File ${EXECDIR}/data/temporalEntities/fragments/${fragment_filename} ${response}= PATCH