|
5 | 5 | import io.kestra.core.models.annotations.Example; |
6 | 6 | import io.kestra.core.models.annotations.Plugin; |
7 | 7 | import io.kestra.core.models.flows.Flow; |
| 8 | +import io.kestra.core.models.flows.FlowSource; |
8 | 9 | import io.kestra.core.models.flows.FlowWithException; |
9 | 10 | import io.kestra.core.models.flows.FlowWithSource; |
10 | 11 | import io.kestra.core.models.property.Property; |
11 | 12 | import io.kestra.core.runners.DefaultRunContext; |
12 | 13 | import io.kestra.core.runners.RunContext; |
13 | 14 | import io.kestra.core.services.FlowService; |
14 | | -import io.kestra.sdk.KestraClient; |
15 | 15 | import io.swagger.v3.oas.annotations.media.Schema; |
16 | 16 | import jakarta.validation.constraints.NotNull; |
17 | 17 | import lombok.*; |
18 | 18 | import lombok.experimental.SuperBuilder; |
19 | 19 | import org.apache.commons.io.IOUtils; |
20 | | -import org.eclipse.jgit.api.Git; |
21 | 20 |
|
22 | 21 | import java.io.IOException; |
23 | 22 | import java.io.InputStream; |
@@ -204,7 +203,7 @@ protected Flow simulateResourceWrite(RunContext runContext, String renderedNames |
204 | 203 |
|
205 | 204 | String flowSource = SyncFlows.replaceNamespace(renderedNamespace, uri, inputStream); |
206 | 205 |
|
207 | | - var flowValidated = flowService.validate(runContext.flowInfo().tenantId(), flowSource).getFirst(); |
| 206 | + var flowValidated = flowService.validate(runContext.flowInfo().tenantId(), List.of(new FlowSource(null, flowSource))).getFirst(); |
208 | 207 |
|
209 | 208 | if (flowValidated.getConstraints() != null) { |
210 | 209 | var ref = uri.getPath(); |
@@ -245,7 +244,7 @@ protected Flow writeResource(RunContext runContext, String renderedNamespace, UR |
245 | 244 |
|
246 | 245 | String flowSource = SyncFlows.replaceNamespace(renderedNamespace, uri, inputStream); |
247 | 246 |
|
248 | | - var flowValidated = flowService.validate(runContext.flowInfo().tenantId(), flowSource).getFirst(); |
| 247 | + var flowValidated = flowService.validate(runContext.flowInfo().tenantId(), List.of(new FlowSource(null, flowSource))).getFirst(); |
249 | 248 |
|
250 | 249 | if (flowValidated.getConstraints() != null) { |
251 | 250 | var ref = uri.getPath(); |
|
0 commit comments