Closed norm-ideal closed 4 years ago
@norm-ideal Thank you very much for the valuable contribution as always. I agree that RedPen servers should support settings of error level as a parameter.
As for the implementation, I think RedPen should not provide setter methods to reduce the states of the objects (kind of a functional programming style) . Adding the threshold
parameter to public Listpublic List<ValidationError> validate(Document document, String threshold)
and apply it in RedPenResource would be simple.
nits. we cannot change the default behavior changing the default threshold.
Thank you for your advice. I should have realised the solution, because it is much cleaner. How about like this?
Update: I found I cannot set the threshold now. Something went wrong.
Now it works.
LGTM. Thank you for your contribution!
redpen-server
was not working correctly with the new feature of "error threshold" that there was no way to specify to getinfo
orwarn
.With this commit they can request an error level by sending
errorLevel
within the POST form such as: