From c49e525759d834483c98a92264f7072747d21bf0 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sat, 23 Sep 2023 11:27:35 +0200 Subject: [PATCH] fix(021_13): send JSON (and not JSON-LD) fragment to align with request headers --- .../temporalEntities/entity-operations-after-query.jsonld | 5 +---- .../entity-operations-before-query.jsonld | 5 +---- .../TemporalContextInformationConsumption.resource | 8 +++++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/data/temporalEntities/entity-operations-after-query.jsonld b/data/temporalEntities/entity-operations-after-query.jsonld index 590f4701..4eeabb72 100644 --- a/data/temporalEntities/entity-operations-after-query.jsonld +++ b/data/temporalEntities/entity-operations-after-query.jsonld @@ -1,8 +1,5 @@ { "type":"Vehicle", "timerel":"after", - "timeAt":"2020-08-02T12:05:00Z", - "@context":[ - "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" - ] + "timeAt":"2020-08-02T12:05:00Z" } \ No newline at end of file diff --git a/data/temporalEntities/entity-operations-before-query.jsonld b/data/temporalEntities/entity-operations-before-query.jsonld index a5033a05..03791c34 100644 --- a/data/temporalEntities/entity-operations-before-query.jsonld +++ b/data/temporalEntities/entity-operations-before-query.jsonld @@ -1,8 +1,5 @@ { "type":"Vehicle", "timerel":"before", - "timeAt":"2020-08-02T12:05:00Z", - "@context":[ - "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" - ] + "timeAt":"2020-08-02T12:05:00Z" } \ No newline at end of file diff --git a/resources/ApiUtils/TemporalContextInformationConsumption.resource b/resources/ApiUtils/TemporalContextInformationConsumption.resource index 29118338..e806f085 100755 --- a/resources/ApiUtils/TemporalContextInformationConsumption.resource +++ b/resources/ApiUtils/TemporalContextInformationConsumption.resource @@ -91,9 +91,11 @@ Query Temporal Representation Of Entities Via Post [Arguments] ${query_file_name} ${content_type}=${CONTENT_TYPE_JSON} ${context}=${EMPTY} ${headers}= Create Dictionary Set To Dictionary ${headers} Content-Type ${content_type} - Set To Dictionary - ... ${headers} - ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + IF '${context}'!='' + Set To Dictionary + ... ${headers} + ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + END ${query_payload}= Load JSON From File ${EXECDIR}/data/temporalEntities/${query_file_name} ${response}= POST ... url=${temporal_api_url}/${TEMPORAL_ENTITY_OPERATIONS_ENDPOINT_PATH}/query -- GitLab