mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(core): serialize subflow inputs with type yml properly
This commit is contained in:
committed by
Loïc Mathieu
parent
018c22918f
commit
09762d2a8d
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user