majialoong commented on PR #21291:
URL: https://github.com/apache/kafka/pull/21291#issuecomment-3750844415

   > > In this PR, I've updated the code to use between in ConfigDef to enforce 
the parameter range, so it will be reflected in the generated documentation to 
remind users of the valid range.
   > 
   > Should we keep the validation as is and limit this PR to documentation 
changes only? We can leave the broader discussion for the KIP associated with 
[KAFKA-20070](https://issues.apache.org/jira/browse/KAFKA-20070)
   
   The range of this parameter has not changed.
   
   Previously, the `validate` method was used to verify that the parameter's 
value was within the range [0, 500]. However, `atLeast(0) `was used to define 
the parameter. This causes the upper limit value of 500 to not be highlighted 
in the generated documentation.
   
   <img width="711" height="309" alt="image" 
src="https://github.com/user-attachments/assets/ecf4d803-4ccb-4f0e-b63a-48e998fd06ec";
 />
   
   Now, by using `between(0, 500)` to directly define the parameter's value 
within the range [0, 500], the upper limit value of 500 will be highlighted in 
the generated document. This is also the upper limit of the range actually 
validated in the previous `validate` method.
   
   <img width="588" height="211" alt="image" 
src="https://github.com/user-attachments/assets/803c1ca1-5b35-43be-9a46-da2a4cdc5c66";
 />
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to