Skip to content

Commit e1a0b6f

Browse files
committed
682 Generate
1 parent 3e9aa15 commit e1a0b6f

File tree

5 files changed

+17
-51
lines changed

5 files changed

+17
-51
lines changed

server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/generated/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ README.md
22
pom.xml
33
src/main/java/com/bytechef/platform/workflow/test/web/rest/ApiUtil.java
44
src/main/java/com/bytechef/platform/workflow/test/web/rest/WorkflowTestApi.java
5-
src/main/java/com/bytechef/platform/workflow/test/web/rest/model/TestWorkflowRequestModel.java
65
src/main/java/com/bytechef/platform/workflow/test/web/rest/model/WebhookRetryModel.java
76
src/main/java/com/bytechef/platform/workflow/test/web/rest/model/WorkflowTestExecutionModel.java

server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/generated/src/main/java/com/bytechef/platform/workflow/test/web/rest/WorkflowTestApi.java

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
*/
66
package com.bytechef.platform.workflow.test.web.rest;
77

8-
import org.springframework.lang.Nullable;
9-
import com.bytechef.platform.workflow.test.web.rest.model.TestWorkflowRequestModel;
10-
import com.bytechef.platform.workflow.test.web.rest.model.WorkflowTestExecutionModel;
118
import io.swagger.v3.oas.annotations.ExternalDocumentation;
129
import io.swagger.v3.oas.annotations.Operation;
1310
import io.swagger.v3.oas.annotations.Parameter;
@@ -35,7 +32,7 @@
3532
import java.util.Optional;
3633
import jakarta.annotation.Generated;
3734

38-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-11-20T06:27:35.138751+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
35+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-12-04T08:54:23.635500+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
3936
@Validated
4037
@Tag(name = "workflow-test", description = "The Platform Workflow Test Internal API")
4138
public interface WorkflowTestApi {
@@ -44,47 +41,30 @@ default Optional<NativeWebRequest> getRequest() {
4441
return Optional.empty();
4542
}
4643

47-
String PATH_TEST_WORKFLOW = "/workflows/{id}/tests";
44+
String PATH_STOP_WORKFLOW_TEST = "/workflow-tests/{jobId}/stop";
4845
/**
49-
* POST /workflows/{id}/tests : Execute a workflow synchronously for testing purpose
50-
* Execute a workflow synchronously for testing purposes.
46+
* POST /workflow-tests/{jobId}/stop : Stop workflow test run
47+
* Abort an in-progress workflow test run identified by jobId. Sends an &#39;error&#39; event with &#39;Aborted&#39; and closes the SSE stream.
5148
*
52-
* @param id Id of the workflow to execute. (required)
53-
* @param environmentId The id of an environment. (required)
54-
* @param testWorkflowRequestModel (optional)
55-
* @return The output expected by the workflow. (status code 200)
49+
* @param jobId The job identifier obtained from the start endpoint. (required)
50+
* @return Run aborted (status code 200)
5651
*/
5752
@Operation(
58-
operationId = "testWorkflow",
59-
summary = "Execute a workflow synchronously for testing purpose",
60-
description = "Execute a workflow synchronously for testing purposes.",
53+
operationId = "stopWorkflowTest",
54+
summary = "Stop workflow test run",
55+
description = "Abort an in-progress workflow test run identified by jobId. Sends an 'error' event with 'Aborted' and closes the SSE stream.",
6156
tags = { "workflow-test" },
6257
responses = {
63-
@ApiResponse(responseCode = "200", description = "The output expected by the workflow.", content = {
64-
@Content(mediaType = "application/json", schema = @Schema(implementation = WorkflowTestExecutionModel.class))
65-
})
58+
@ApiResponse(responseCode = "200", description = "Run aborted")
6659
}
6760
)
6861
@RequestMapping(
6962
method = RequestMethod.POST,
70-
value = WorkflowTestApi.PATH_TEST_WORKFLOW,
71-
produces = { "application/json" },
72-
consumes = { "application/json" }
63+
value = WorkflowTestApi.PATH_STOP_WORKFLOW_TEST
7364
)
74-
default ResponseEntity<WorkflowTestExecutionModel> testWorkflow(
75-
@NotNull @Parameter(name = "id", description = "Id of the workflow to execute.", required = true, in = ParameterIn.PATH) @PathVariable("id") String id,
76-
@NotNull @Parameter(name = "environmentId", description = "The id of an environment.", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "environmentId", required = true) Long environmentId,
77-
@Parameter(name = "TestWorkflowRequestModel", description = "") @Valid @RequestBody(required = false) @Nullable TestWorkflowRequestModel testWorkflowRequestModel
65+
default ResponseEntity<Void> stopWorkflowTest(
66+
@NotNull @Parameter(name = "jobId", description = "The job identifier obtained from the start endpoint.", required = true, in = ParameterIn.PATH) @PathVariable("jobId") Long jobId
7867
) {
79-
getRequest().ifPresent(request -> {
80-
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
81-
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
82-
String exampleString = "{ \"triggerExecution\" : { \"retryDelayFactor\" : 9, \"endDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedBy\" : \"lastModifiedBy\", \"batch\" : true, \"icon\" : \"icon\", \"error\" : { \"stackTrace\" : [ \"stackTrace\", \"stackTrace\" ], \"message\" : \"message\" }, \"priority\" : 4, \"title\" : \"title\", \"type\" : \"type\", \"executionTime\" : 7, \"output\" : \"{}\", \"retryDelay\" : \"retryDelay\", \"input\" : { \"key\" : \"\" }, \"retryDelayMillis\" : 9, \"maxRetries\" : 1, \"createdDate\" : \"2000-01-23T04:56:07.000+00:00\", \"createdBy\" : \"createdBy\", \"workflowTrigger\" : { \"metadata\" : { \"key\" : \"\" }, \"name\" : \"name\", \"description\" : \"description\", \"label\" : \"label\", \"type\" : \"type\", \"parameters\" : { \"key\" : \"\" }, \"connections\" : [ { \"workflowNodeName\" : \"workflowNodeName\", \"componentName\" : \"componentName\", \"componentVersion\" : 7, \"key\" : \"key\", \"required\" : true }, { \"workflowNodeName\" : \"workflowNodeName\", \"componentName\" : \"componentName\", \"componentVersion\" : 7, \"key\" : \"key\", \"required\" : true } ], \"timeout\" : \"timeout\" }, \"id\" : \"id\", \"retryAttempts\" : 5, \"startDate\" : \"2000-01-23T04:56:07.000+00:00\", \"status\" : \"CREATED\" }, \"job\" : { \"outputs\" : { \"key\" : \"\" }, \"metadata\" : { \"key\" : \"\" }, \"taskExecutions\" : [ { \"endDate\" : \"2000-01-23T04:56:07.000+00:00\", \"icon\" : \"icon\", \"error\" : { \"stackTrace\" : [ \"stackTrace\", \"stackTrace\" ], \"message\" : \"message\" }, \"title\" : \"title\", \"type\" : \"type\", \"output\" : \"{}\", \"retryDelay\" : \"retryDelay\", \"retryDelayMillis\" : 4, \"id\" : \"id\", \"retryAttempts\" : 9, \"retryDelayFactor\" : 3, \"lastModifiedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedBy\" : \"lastModifiedBy\", \"workflowTask\" : { \"metadata\" : { \"key\" : \"\" }, \"pre\" : [ null, null ], \"clusterRoot\" : false, \"description\" : \"description\", \"label\" : \"label\", \"type\" : \"type\", \"timeout\" : \"timeout\", \"node\" : \"node\", \"post\" : [ null, null ], \"clusterElements\" : { \"key\" : \"\" }, \"name\" : \"name\", \"finalize\" : [ null, null ], \"parameters\" : { \"key\" : \"\" }, \"connections\" : [ { \"workflowNodeName\" : \"workflowNodeName\", \"componentName\" : \"componentName\", \"componentVersion\" : 7, \"key\" : \"key\", \"required\" : true }, { \"workflowNodeName\" : \"workflowNodeName\", \"componentName\" : \"componentName\", \"componentVersion\" : 7, \"key\" : \"key\", \"required\" : true } ] }, \"priority\" : 2, \"parentId\" : \"parentId\", \"executionTime\" : 5, \"input\" : { \"key\" : \"\" }, \"jobId\" : \"jobId\", \"maxRetries\" : 5, \"createdDate\" : \"2000-01-23T04:56:07.000+00:00\", \"createdBy\" : \"createdBy\", \"progress\" : 7, \"taskNumber\" : 2, \"startDate\" : \"2000-01-23T04:56:07.000+00:00\", \"status\" : \"CREATED\" }, { \"endDate\" : \"2000-01-23T04:56:07.000+00:00\", \"icon\" : \"icon\", \"error\" : { \"stackTrace\" : [ \"stackTrace\", \"stackTrace\" ], \"message\" : \"message\" }, \"title\" : \"title\", \"type\" : \"type\", \"output\" : \"{}\", \"retryDelay\" : \"retryDelay\", \"retryDelayMillis\" : 4, \"id\" : \"id\", \"retryAttempts\" : 9, \"retryDelayFactor\" : 3, \"lastModifiedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedBy\" : \"lastModifiedBy\", \"workflowTask\" : { \"metadata\" : { \"key\" : \"\" }, \"pre\" : [ null, null ], \"clusterRoot\" : false, \"description\" : \"description\", \"label\" : \"label\", \"type\" : \"type\", \"timeout\" : \"timeout\", \"node\" : \"node\", \"post\" : [ null, null ], \"clusterElements\" : { \"key\" : \"\" }, \"name\" : \"name\", \"finalize\" : [ null, null ], \"parameters\" : { \"key\" : \"\" }, \"connections\" : [ { \"workflowNodeName\" : \"workflowNodeName\", \"componentName\" : \"componentName\", \"componentVersion\" : 7, \"key\" : \"key\", \"required\" : true }, { \"workflowNodeName\" : \"workflowNodeName\", \"componentName\" : \"componentName\", \"componentVersion\" : 7, \"key\" : \"key\", \"required\" : true } ] }, \"priority\" : 2, \"parentId\" : \"parentId\", \"executionTime\" : 5, \"input\" : { \"key\" : \"\" }, \"jobId\" : \"jobId\", \"maxRetries\" : 5, \"createdDate\" : \"2000-01-23T04:56:07.000+00:00\", \"createdBy\" : \"createdBy\", \"progress\" : 7, \"taskNumber\" : 2, \"startDate\" : \"2000-01-23T04:56:07.000+00:00\", \"status\" : \"CREATED\" } ], \"endDate\" : \"2000-01-23T04:56:07.000+00:00\", \"lastModifiedDate\" : \"2000-01-23T04:56:07.000+00:00\", \"inputs\" : { \"key\" : \"\" }, \"lastModifiedBy\" : \"lastModifiedBy\", \"currentTask\" : 0, \"label\" : \"label\", \"error\" : { \"stackTrace\" : [ \"stackTrace\", \"stackTrace\" ], \"message\" : \"message\" }, \"priority\" : 1, \"createdDate\" : \"2000-01-23T04:56:07.000+00:00\", \"createdBy\" : \"createdBy\", \"parentTaskExecutionId\" : 6, \"webhooks\" : [ { \"type\" : \"type\", \"url\" : \"url\", \"retry\" : { \"maxAttempts\" : 1, \"multiplier\" : 6, \"initialInterval\" : 1, \"maxInterval\" : 1 } }, { \"type\" : \"type\", \"url\" : \"url\", \"retry\" : { \"maxAttempts\" : 1, \"multiplier\" : 6, \"initialInterval\" : 1, \"maxInterval\" : 1 } } ], \"id\" : \"id\", \"startDate\" : \"2000-01-23T04:56:07.000+00:00\", \"workflowId\" : \"workflowId\", \"status\" : \"CREATED\" } }";
83-
ApiUtil.setExampleResponse(request, "application/json", exampleString);
84-
break;
85-
}
86-
}
87-
});
8868
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
8969

9070
}

server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/generated/src/main/java/com/bytechef/platform/workflow/test/web/rest/model/TestWorkflowRequestModel.java

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,17 @@
2323
*/
2424

2525
@JsonTypeName("testWorkflow_request")
26-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-11-20T06:27:35.138751+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
26+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-12-01T08:02:58.568220+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
2727
public class TestWorkflowRequestModel {
2828

2929
@Valid
3030
private Map<String, Object> inputs = new HashMap<>();
3131

32-
public TestWorkflowRequestModel inputs(Map<String, Object> inputs) {
33-
this.inputs = inputs;
34-
return this;
35-
}
36-
37-
public TestWorkflowRequestModel putInputsItem(String key, Object inputsItem) {
38-
if (this.inputs == null) {
39-
this.inputs = new HashMap<>();
40-
}
41-
this.inputs.put(key, inputsItem);
42-
return this;
43-
}
44-
4532
/**
4633
* The input parameters used as workflow input values.
4734
* @return inputs
4835
*/
49-
36+
5037
@Schema(name = "inputs", description = "The input parameters used as workflow input values.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
5138
@JsonProperty("inputs")
5239
public Map<String, Object> getInputs() {

server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/generated/src/main/java/com/bytechef/platform/workflow/test/web/rest/model/WebhookRetryModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222

2323
@JsonTypeName("Webhook_retry")
24-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-11-20T06:27:35.138751+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
24+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-12-04T08:54:23.635500+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
2525
public class WebhookRetryModel {
2626

2727
private @Nullable Integer initialInterval;

server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-rest/generated/src/main/java/com/bytechef/platform/workflow/test/web/rest/model/WorkflowTestExecutionModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
@Schema(name = "WorkflowTestExecution", description = "Contains information about test execution of a workflow.")
2424
@JsonTypeName("WorkflowTestExecution")
25-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-11-20T06:27:35.138751+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
25+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-12-04T08:54:23.635500+01:00[Europe/Zagreb]", comments = "Generator version: 7.17.0")
2626
public class WorkflowTestExecutionModel {
2727

2828
private @Nullable com.bytechef.platform.workflow.execution.web.rest.model.JobModel job;

0 commit comments

Comments
 (0)