Only iterate over values in pathParams and requiredParams

Fixes #237