Repository: kestra-io/kestra (java)

Issue:
[UI] When a task property is not required, the documentation shows a ? instead of a X
### Describe the issue

When a tas kproperty is not required, the documentation shows a ? instead of a X

For ex for the log task

![image](https://github.com/kestra-io/kestra/assets/1819009/0aaeaeb9-a8a6-464c-8b76-eb44801e7d45)


### Environment

- Kestra Version:
- Operating System (OS/Docker/Kubernetes):
- Java Version (if you don't run kestra in Docker):


Pull request description:
fix(core): default documentation to required false
In case a task is not required, default to false or the documentation will display '?'.

Fixes #3145

Patch:
diff --git a/core/src/main/java/io/kestra/core/docs/AbstractClassDocumentation.java b/core/src/main/java/io/kestra/core/docs/AbstractClassDocumentation.java
index 541cc2a00..3b5260b48 100644
--- a/core/src/main/java/io/kestra/core/docs/AbstractClassDocumentation.java
+++ b/core/src/main/java/io/kestra/core/docs/AbstractClassDocumentation.java
@@ -112,6 +112,8 @@ public abstract class AbstractClassDocumentation<T> {
             Map<String, Object> finalValue = (Map<String, Object>) current.getValue();
             if (required.contains(current.getKey())) {
                 finalValue.put("$required", true);
+            } else {
+                finalValue.put("$required", false);
             }
 
             result.put(flattenKey(current.getKey(), parentName), finalValue);


Test patch:
diff --git a/cli/src/test/java/io/kestra/cli/commands/plugins/PluginDocCommandTest.java b/cli/src/test/java/io/kestra/cli/commands/plugins/PluginDocCommandTest.java
index 5c2af967b..d18fd242c 100644
--- a/cli/src/test/java/io/kestra/cli/commands/plugins/PluginDocCommandTest.java
+++ b/cli/src/test/java/io/kestra/cli/commands/plugins/PluginDocCommandTest.java
@@ -99,7 +99,7 @@ class PluginDocCommandTest {
                 ### `example`
                 * **Type:** ==string==
                 * **Dynamic:** ✔️
-                * **Required:** ❓
+                * **Required:** ❌
 
                 > Example interface
                 """));