Skip to content
Success

Changes

Summary

  1. Fix cases where a northbound result had 2 'type' keys (#201) (commit: 082cf00) (details)
Commit 082cf009d297b984b3f14139e616650717f0ff72 by GitHub
Fix cases where a northbound result had 2 'type' keys (#201)

* Fix cases where result had 2 'type' keys

* Added more tests to check QueryHandler behaviour

* Use the right DTO in handleSet

* Fix the serialization/deserialization of TypedResponse

In some cases the TypedResponse serializes and deserializes in a strange way, resulting in two properties with the name "type". This commit simplifies the Jackson metadata and uses a custom deserializer to correctly identify the SubResult type that should be used in the TypedResponse.

Signed-off-by: Tim Ward <timothyjward@apache.org>

---------

Signed-off-by: Tim Ward <timothyjward@apache.org>
Co-authored-by: Tim Ward <timothyjward@apache.org>
(commit: 082cf00)
The file was modified northbound/query-handler/src/main/java/org/eclipse/sensinact/northbound/query/impl/QueryHandler.java (diff)
The file was modified northbound/query-handler/src/main/java/org/eclipse/sensinact/northbound/query/api/AbstractResultDTO.java (diff)
The file was addednorthbound/query-handler/src/main/java/org/eclipse/sensinact/northbound/query/dto/result/ResponseSetDTO.java
The file was addednorthbound/query-handler/src/main/java/org/eclipse/sensinact/northbound/query/dto/result/jackson/TypedResponseDeserializer.java
The file was modified northbound/query-handler/src/main/java/org/eclipse/sensinact/northbound/query/dto/result/TypedResponse.java (diff)
The file was modified northbound/query-handler/src/test/java/org/eclipse/sensinact/northbound/query/test/integration/SerializationTest.java (diff)