From 39d2919043e5505fa91f39a1639c3fb5cd189536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Fri, 22 Nov 2024 17:25:53 +0100 Subject: [PATCH] feat(core): set Data property to not dynamic --- .../src/main/java/io/kestra/core/docs/JsonSchemaGenerator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/io/kestra/core/docs/JsonSchemaGenerator.java b/core/src/main/java/io/kestra/core/docs/JsonSchemaGenerator.java index 7e8df297b0c..58801a563e2 100644 --- a/core/src/main/java/io/kestra/core/docs/JsonSchemaGenerator.java +++ b/core/src/main/java/io/kestra/core/docs/JsonSchemaGenerator.java @@ -16,6 +16,7 @@ import com.github.victools.jsonschema.module.jakarta.validation.JakartaValidationOption; import com.github.victools.jsonschema.module.swagger2.Swagger2Module; import com.google.common.collect.ImmutableMap; +import io.kestra.core.models.property.Data; import io.kestra.core.models.property.Property; import io.kestra.core.models.annotations.Plugin; import io.kestra.core.models.annotations.PluginProperty; @@ -277,6 +278,8 @@ public CustomDefinition provideCustomSchemaDefinition(ResolvedType javaType, Sch if (!String.class.isAssignableFrom(targetType) && String.class.isAssignableFrom(member.getType().getErasedType())) { memberAttributes.put("pattern", ".*{{.*}}.*"); } + } else if (member.getDeclaredType().isInstanceOf(Data.class)) { + memberAttributes.put("$dynamic", false); } });