From e644b14adfb9eca35e27341c570aa9e06c03d2d6 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sat, 23 Sep 2023 09:53:01 +0200 Subject: [PATCH 1/3] fix: value of details parameter should be true (not True) in entity discovery operations --- resources/ApiUtils/ContextInformationConsumption.resource | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index 442f2929..3c6aff31 100755 --- a/resources/ApiUtils/ContextInformationConsumption.resource +++ b/resources/ApiUtils/ContextInformationConsumption.resource @@ -152,7 +152,7 @@ Retrieve Attributes ... ${headers} ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" END - IF ${details} Set To Dictionary ${params} details=${details} + IF ${details} Set To Dictionary ${params} details=true ${response}= GET ... url=${url}/${ATTRIBUTES_ENDPOINT_PATH} ... headers=${headers} @@ -218,7 +218,7 @@ Retrieve Entity Types ... ${headers} ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" END - IF ${details} Set To Dictionary ${params} details=${details} + IF ${details} Set To Dictionary ${params} details=true ${response}= GET ... url=${url}/${ENTITIES_TYPES_ENDPOINT_PATH}/ ... headers=${headers} -- GitLab From 7e389d963d14d4f36d830d007a32fc885b37de0b Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Tue, 26 Sep 2023 21:48:22 +0200 Subject: [PATCH 2/3] feat: improve handling of true / false in entity and attribute discovery --- .../RetrieveDetailsOfAvailableAttributes/026_01.robot | 2 +- .../RetrieveDetailsOfAvailableEntityTypes/023_01.robot | 2 +- resources/ApiUtils/ContextInformationConsumption.resource | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot index ac502720..645b32b1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableAttributes/026_01.robot @@ -28,7 +28,7 @@ ${filename}= building-simple-attributes-sample.json Retrieve Details Of Available Attributes [Documentation] Check that you can retrieve a list with a detailed representation of NGSI-LD attributes [Arguments] ${context} ${expectation_file} - ${response}= Retrieve Attributes context=${context} details=${TRUE} + ${response}= Retrieve Attributes context=${context} details=true Check Response Status Code 200 ${response.status_code} Check Response Body Containing Attribute element ${expectation_file} ${response.json()} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot index d4a5452f..21e578f1 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveDetailsOfAvailableEntityTypes/023_01.robot @@ -30,7 +30,7 @@ ${second_filename}= vehicle-simple-attributes-sample.json Retrieve Details Of Available Entity Types [Documentation] Check that you can retrieve a list with a detailed representation of NGSI-LD entity types [Arguments] ${context} ${expectation_file} - ${response}= Retrieve Entity Types context=${context} details=${TRUE} + ${response}= Retrieve Entity Types context=${context} details=true Check Response Status Code 200 ${response.status_code} Check Response Body Containing EntityType element ${expectation_file} ${response.json()} diff --git a/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index 3c6aff31..47f16ff5 100755 --- a/resources/ApiUtils/ContextInformationConsumption.resource +++ b/resources/ApiUtils/ContextInformationConsumption.resource @@ -140,7 +140,7 @@ Retrieve Attribute RETURN ${response} Retrieve Attributes - [Arguments] ${context}=${EMPTY} ${details}=${FALSE} ${accept}=${EMPTY} + [Arguments] ${context}=${EMPTY} ${details}=false ${accept}=${EMPTY} &{headers}= Create Dictionary &{params}= Create Dictionary @@ -152,7 +152,7 @@ Retrieve Attributes ... ${headers} ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" END - IF ${details} Set To Dictionary ${params} details=true + Set To Dictionary ${params} details ${details} ${response}= GET ... url=${url}/${ATTRIBUTES_ENDPOINT_PATH} ... headers=${headers} @@ -206,7 +206,7 @@ Retrieve Entity Type RETURN ${response} Retrieve Entity Types - [Arguments] ${context}=${EMPTY} ${details}=${FALSE} ${accept}=${EMPTY} + [Arguments] ${context}=${EMPTY} ${details}=false ${accept}=${EMPTY} &{headers}= Create Dictionary &{params}= Create Dictionary @@ -218,7 +218,7 @@ Retrieve Entity Types ... ${headers} ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" END - IF ${details} Set To Dictionary ${params} details=true + Set To Dictionary ${params} details ${details} ${response}= GET ... url=${url}/${ENTITIES_TYPES_ENDPOINT_PATH}/ ... headers=${headers} -- GitLab From 8f9f2ba989bfbc3c02e7d80dd6f4ab7212880870 Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Thu, 28 Sep 2023 09:30:32 +0200 Subject: [PATCH 3/3] chore: use common syntax to add request param --- resources/ApiUtils/ContextInformationConsumption.resource | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index 47f16ff5..8750b7d3 100755 --- a/resources/ApiUtils/ContextInformationConsumption.resource +++ b/resources/ApiUtils/ContextInformationConsumption.resource @@ -152,7 +152,7 @@ Retrieve Attributes ... ${headers} ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" END - Set To Dictionary ${params} details ${details} + Set To Dictionary ${params} details=${details} ${response}= GET ... url=${url}/${ATTRIBUTES_ENDPOINT_PATH} ... headers=${headers} @@ -218,7 +218,7 @@ Retrieve Entity Types ... ${headers} ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" END - Set To Dictionary ${params} details ${details} + Set To Dictionary ${params} details=${details} ${response}= GET ... url=${url}/${ENTITIES_TYPES_ENDPOINT_PATH}/ ... headers=${headers} -- GitLab