fix(core): serialize subflow inputs with type yml properly

This commit is contained in:
mustafatarek
2025-12-05 22:07:02 +02:00
committed by Loïc Mathieu
parent 018c22918f
commit 09762d2a8d

View File

@@ -499,7 +499,17 @@ public class FlowInputOutput {
}
}
case JSON -> JacksonMapper.toObject(current.toString());
case YAML -> YAML_MAPPER.readValue(current.toString(), JacksonMapper.OBJECT_TYPE_REFERENCE);
case YAML -> {
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 -> {
Matcher matcher = URI_PATTERN.matcher(current.toString());
if (matcher.matches()) {