Skip to content

Commit

Permalink
only enable filter if base class is null
Browse files Browse the repository at this point in the history
  • Loading branch information
bppdanto-t committed Dec 3, 2024
1 parent 6281f2c commit 8fae165
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ protected AbstractClassDocumentation(JsonSchemaGenerator jsonSchemaGenerator, Cl
// Remove the Task entry as it only contains a reference that is filtered in the doc template,
// which prevent the Definitions section to be empty if no other def exist.
.filter(entry -> !entry.getKey().equals("io.kestra.core.models.tasks.Task"))
// Remove definitions of all Input subtypes
.filter(entry -> !entry.getKey().startsWith("io.kestra.core.models.flows.input."))
// Remove definitions of all Input subtypes if base class is null
.filter(entry -> (baseCls == null) || !entry.getKey().startsWith("io.kestra.core.models.flows.input."))
.map(entry -> {
Map<String, Object> value = (Map<String, Object>) entry.getValue();
value.put("properties", flatten(properties(value), required(value), isTypeToKeep(entry.getKey())));
Expand Down

0 comments on commit 8fae165

Please sign in to comment.