Ensuring only keys that correspond to http methods are considered in paths