The ParamValidator::PARAM_ISMULTI setting causes strings to be split in arrays. This makes sense in the context where param seetings where originally used (query parameters and HTML form data) but it's confusing in a JSON request body. So in case we have a JSON request body, require a parameter that has PARAM_ISMULTI to be an array. To achieve this, we can use the same mechanism we already implemented for requiring the correct types for numeric parameters in JSON, throug the TypeDef::OPT_ENFORCE_JSON_TYPES option.
Originally Filed
Original title: REST: disallow PARAM_ISMULTI in JSON
The use of ParamValidator::PARAM_ISMULTI is confusing in a JSON request body. An ArrayDef should be used instead (T362108: Implement JSON schema validation in ArrayDef).
To implement this restriction, RestStructureTest::testBodyParameters should fail if ParamValidator::PARAM_ISMULTI is set.
Note that this will also prohibit the use of ParamValidator::PARAM_ISMULTI with form data requests. While this is a conceivable valid use case, we don't anticipate that we will actually encouonter it. If and when we do, we can implement a smarter solution as needed.