fixes #6674 - correctly access wrapped params, fix apipie doc

I agree. I would first try changing the wrap_parameters line to see if it can use `params[:host]` instead of `params[:base]`. If not, maybe something like `params[:base] ||= params[:host]` might be a suboptimal solution?