Foxx: use joi in queryParam and pathParam (fixes #936)

This implements the changes in #936.
This is about path params, why did you change it to a query param?