kl0u 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_r344215702
 
 

 ##########
 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:
   My only two cents on this one are that if in the future we want users to be 
able to specify these options also programatically, it would make sense to also 
have the name of the class.
   
   But I am not so sure about the final result so I am also willing to leave it 
like this.

----------------------------------------------------------------
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