[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):

core/src/main/java/io/kestra/core/docs/AbstractClassDocumentation.java
core/src/main/java/io/kestra/core/docs/AbstractClassDocumentation.java
cli/src/test/java/io/kestra/cli/commands/plugins/PluginDocCommandTest.java
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 541cc2a006..3b5260b485 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 @@ protected static Map<String, Object> flatten(Map<String, Object> map, List<Strin
             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);

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 5c2af967b3..d18fd242cb 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 @@ void run() throws IOException, URISyntaxException {
                 ### `example`
                 * **Type:** ==string==
                 * **Dynamic:** ✔️
-                * **Required:** ❓
+                * **Required:** ❌
 
                 > Example interface
                 """));
