diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java index 67e6af86..7fd83c76 100644 --- a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java +++ b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java @@ -110,9 +110,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p gen.writeObject(eventDefinition); } gen.writeEndArray(); - } else { - gen.writeArrayFieldStart("events"); - gen.writeEndArray(); } if (workflow.getFunctions() != null && !workflow.getFunctions().getFunctionDefs().isEmpty()) { @@ -121,9 +118,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p gen.writeObject(function); } gen.writeEndArray(); - } else { - gen.writeArrayFieldStart("functions"); - gen.writeEndArray(); } if (workflow.getRetries() != null && !workflow.getRetries().getRetryDefs().isEmpty()) { @@ -132,9 +126,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p gen.writeObject(retry); } gen.writeEndArray(); - } else { - gen.writeArrayFieldStart("retries"); - gen.writeEndArray(); } if (workflow.getErrors() != null && !workflow.getErrors().getErrorDefs().isEmpty()) { @@ -143,9 +134,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p gen.writeObject(error); } gen.writeEndArray(); - } else { - gen.writeArrayFieldStart("errors"); - gen.writeEndArray(); } if (workflow.getSecrets() != null && !workflow.getSecrets().getSecretDefs().isEmpty()) { @@ -154,9 +142,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p gen.writeString(secretDef); } gen.writeEndArray(); - } else { - gen.writeArrayFieldStart("secrets"); - gen.writeEndArray(); } if (workflow.getConstants() != null && !workflow.getConstants().getConstantsDef().isEmpty()) { @@ -177,9 +162,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p gen.writeObject(state); } gen.writeEndArray(); - } else { - gen.writeArrayFieldStart("states"); - gen.writeEndArray(); } if (workflow.getExtensions() != null && !workflow.getExtensions().isEmpty()) {