Skip to content

Commit d45507c

Browse files
committed
Inforporate fjtirado review; format
Signed-off-by: Ricardo Zanini <[email protected]>
1 parent cbc4398 commit d45507c

File tree

3 files changed

+73
-97
lines changed

3 files changed

+73
-97
lines changed

experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncCallHttpStep.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,12 @@ public FuncCallHttpStep self() {
4242
}
4343

4444
protected void configure(FuncTaskItemListBuilder list, Consumer<FuncCallHttpTaskBuilder> post) {
45-
if (name == null) {
46-
list.http(
47-
builder -> {
48-
// Apply HTTP config (BaseCallHttpSpec)
49-
this.accept(builder); // default method from BaseCallHttpSpec
50-
// Apply Step’s post-configurers (when / inputFrom / outputAs / exportAs)
51-
post.accept(builder);
52-
});
53-
} else {
54-
list.http(
55-
name,
56-
builder -> {
57-
this.accept(builder);
58-
post.accept(builder);
59-
});
60-
}
45+
list.http(
46+
name,
47+
builder -> {
48+
this.accept(builder);
49+
post.accept(builder);
50+
});
6151
}
6252

6353
@Override

experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncCallOpenAPIStep.java

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,13 @@ public FuncCallOpenAPIStep output(OpenAPIArguments.WithOpenAPIOutput output) {
9696
@Override
9797
protected void configure(
9898
FuncTaskItemListBuilder list, Consumer<FuncCallOpenAPITaskBuilder> post) {
99-
if (name == null) {
100-
list.openapi(
101-
builder -> {
102-
for (Consumer<CallOpenAPITaskFluent<?>> c : steps) {
103-
c.accept(builder); // OpenAPI DSL
104-
}
105-
post.accept(builder); // when/inputFrom/outputAs/exportAs
106-
});
107-
} else {
108-
list.openapi(
109-
name,
110-
builder -> {
111-
for (Consumer<CallOpenAPITaskFluent<?>> c : steps) {
112-
c.accept(builder);
113-
}
114-
post.accept(builder);
115-
});
116-
}
99+
list.openapi(
100+
name,
101+
builder -> {
102+
for (Consumer<CallOpenAPITaskFluent<?>> c : steps) {
103+
c.accept(builder);
104+
}
105+
post.accept(builder);
106+
});
117107
}
118108
}

0 commit comments

Comments
 (0)