Task/default attribute value null instead blank#946
Conversation
|
No faults where reported about iotas: Failing scenarios: 6 features passed, 3 failed, 62 skipped |
…te_value_null_instead_blank
|
From travis: |
|
It seems that some test related with NGSI-LD are failing: @jason-fox could you have a look an provide feedback on how to fix them, please? |
|
From the latest ETSI specification:
The tests in question are failing with 500 BadRequestData because the input payload to the context broker is invalid. |
|
When sending an undefined value, you need to insert a JSON object which is interpreted as const NGSI_LD_NULL = { '@type': 'Intangible', '@value': null };Where |
test/unit/ngsi-ld/examples/contextRequests/createMinimumProvisionedDevice.json
Show resolved
Hide resolved
…ionedDevice.json Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
…te_value_null_instead_blank
|
At 54ec0b9, using At 2db114b, using So it seems that using the "NGSI-LD null way" test restuls are worse than with just null... Definitely, we need help from NGSI-LD experts to fix this. @jason-fox could you provide feedback on how to fix this (or even better: a PR with the fix itself using revert-945-revert-942-task/default_attribute_value_null_instead_blank as base branch), please? |
…ault_attribute_value_null_instead_blank Fixing requests
|
The unexpected side-effect from this change is a change in default truthy-ness of undefined alert(Boolean(true)); // returns true
alert(Boolean(false)); // returns false
alert(Boolean(null)); // returns false
alert(Boolean(' ')); // truePreviously if I had the following {
"id": "light1",
"type": "Light",
"state": {
"type": "Boolean",
"value": " "
}
}This is implicitly Now I have the following: {
"id": "light1",
"type": "Light",
"state": {
"type": "Boolean",
"value": null
}
}But for NGSI-LD as explained, you can't have a |
|
Thanks for the feedback @jason-fox We think that side-effect would not have any impact on the existing e2e usages of the issue. We are going to merge this PR and we will confirm it after the CI e2e after some hours. |

(revert from a revert)
this branch contais PR changes from original branch task/default_attribute_value_null_instead_blank
Do not merge until passes: