def require_params(self, req):
        params = {}
        for name, param in self.params.items():
            if name not in req.params and param.required:
                missing = set(
                    p for p in self.params
                    if self.params[p].required
                ) - set(req.params.keys())
                raise errors.HTTPMissingParam(", ".join(missing))
            elif name in req.params or param.default:
                try:
                    if param.many:
                        values = req.get_param_as_list(
                            name, param.validated_value
                        ) or [
                            param.default and
                            param.validated_value(param.default)
                        ]
                        params[name] = param.container(values)
                    else:
                        params[name] = param.validated_value(
                            req.get_param(name, default=param.default)
                        )
                except ValidationError as err:
                    raise err.as_invalid_param(name)
                except ValueError as err:
                    raise errors.HTTPInvalidParam(str(err), name)
        return params