def add_path(self, path, method=None):
method = self._normalize_method_name(method)<EOL>path_dict = self.paths.setdefault(path, {})<EOL>if not isinstance(path_dict, dict):<EOL><INDENT>raise InvalidDocumentException(<EOL>[InvalidTemplateException("<STR_LIT>"<EOL>.format(path))])<EOL><DEDENT>if self._CONDITIONAL_IF in path_dict:<EOL><INDENT>path_dict = path_dict[self._CONDITIONAL_IF][<NUM_LIT:1>]<EOL><DEDENT>path_dict.setdefault(method, {})<EOL>
Adds the path/method combination to the Swagger, if not already present

:param string path: Path name
:param string method: HTTP method
:raises ValueError: If the value of `path` in Swagger is not a dictionary