Closed FlorianCassayre closed 3 years ago
I see, I was not 100% sure about this part but it can be changed for sure (raise an exception instead of filtering the invalid parameters). Or even better, have it as a configurable behaviour. One argument in favour of filtering was to be able to gracefully handle old urls after one of the parameter name has changed; or for instance if the allowed page sizes were updated. In any case the existing validation was incomplete and would let invalid values pass through, which we don't want for sure.
Post-discussion: yes filter them, no need for config.
UrlParamValidator
in case one needs to build a stricter validator on top of it (for instance, ensure the provided page size is indeed an option of the dropdown)