Closed roelofkemp closed 3 years ago
Shouldn't the output be "crash" instead? Your expected output is to just silently ignore the merge but that can cause problems much further on the line. Fail fast applies here I think
agreed. I've updated the original description
Released as bundle com.dexels.navajo.document
version 3.6.38
.
found an error when using the following code:
The merge operation on Navajo message currently does not correctly take the message type into account. Consider this example:
If these two messages will be merged:
source.merge(target)
, the current result will be:Note that the message type for M1 and M2 have changed. This should not happen, especially in combination with entities where an entity definition may define a message as simple, and the output of the response can change its type to array (or the other way around), and yet the client relies on the entity definition.
Therefore incompatible message types should not be considered mergeable and an exception should be thrown