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

 ##########
 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:
   I'm with @zentol on that one. I think for programmatic approach its enough 
that we have that type encoded in the `ConfigOption`. These docs are rather for 
defining options from config files.

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