AndrewJSchofield commented on code in PR #17498:
URL: https://github.com/apache/kafka/pull/17498#discussion_r1810858734


##########
clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java:
##########
@@ -103,14 +103,48 @@ private static void schemaToFieldTableHtml(Schema schema, 
StringBuilder b) {
         b.append("<th>Description</th>\n");
         b.append("</tr>");
         for (BoundField field : fields) {
-            b.append("<tr>\n");
-            b.append("<td>");
-            b.append(field.def.name);
-            b.append("</td>");
-            b.append("<td>");
-            b.append(field.def.docString);
-            b.append("</td>");
-            b.append("</tr>\n");
+            if (field.def.type instanceof TaggedFields) {
+                TaggedFields taggedFields = (TaggedFields) field.def.type;
+                // Only include the field in the table if there are actually 
tags defined
+                if (taggedFields.numFields() > 0) {

Review Comment:
   <img width="997" alt="Screenshot 2024-10-22 at 15 35 42" 
src="https://github.com/user-attachments/assets/95209248-4e32-4932-b5c0-3da3f09786f7";>
   
   I've added back the empty rows for situations in which there are no tagged 
fields defined, and also renamed "TAG_BUFFER" as "_tagged_fields".
   



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to