zentol commented on a change in pull request #10117: [FLINK-14494][docs] Add 
ConfigOption type to the documentation generator
URL: https://github.com/apache/flink/pull/10117#discussion_r343844082
 
 

 ##########
 File path: 
flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java
 ##########
 @@ -284,10 +290,31 @@ private static String toHtmlString(final 
OptionWithMetaInfo optionWithMetaInfo)
                        "        <tr>\n" +
                        "            <td><h5>" + escapeCharacters(option.key()) 
+ "</h5>" + execModeStringBuilder.toString() + "</td>\n" +
                        "            <td style=\"word-wrap: break-word;\">" + 
escapeCharacters(addWordBreakOpportunities(defaultValue)) + "</td>\n" +
+                       "            <td>" + type + "</td>\n" +
                        "            <td>" + 
formatter.format(option.description()) + "</td>\n" +
                        "        </tr>\n";
        }
 
+       static String typeToHtml(OptionWithMetaInfo optionWithMetaInfo) {
+               ConfigOption<?> option = optionWithMetaInfo.option;
+               String typeName = option.getClazz().getSimpleName();
+               final String type;
+               if (option.isList()) {
+                       type = String.format("List<%s>", typeName);
+               } else {
+                       type = typeName;
+               }
+
+               if (option.getClazz().isEnum()) {
+                       return String.format(
+                               "<p>%s</p>Possible values: %s",
+                               escapeCharacters(type),
 
 Review comment:
   the actual class name is overkill imo and mostly an implementation detail; 
I'd just stick to `Enum: Possible values: ...`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to