fix(tests): fix allValidTypedInputs() test by avoiding serialization of strings or other scalars, only serialize Maps and Collections

This commit is contained in:
mustafatarek
2025-12-06 12:13:25 +02:00
committed by Loïc Mathieu
parent f3aed38964
commit a74ebd5cd6

View File

@@ -500,7 +500,14 @@ public class FlowInputOutput {
}
case JSON -> JacksonMapper.toObject(current.toString());
case YAML -> {
String yaml = YAML_MAPPER.writeValueAsString(current);
String yaml;
if(current instanceof Collection<?> || current instanceof Map){
yaml = YAML_MAPPER.writeValueAsString(current);
}
else{
yaml = current.toString();
}
yield YAML_MAPPER.readValue(yaml, JacksonMapper.OBJECT_TYPE_REFERENCE);
}
case URI -> {