def _GenDiscoveryDoc(service_class_names,<EOL>output_path, hostname=None,<EOL>application_path=None):
output_files = []<EOL>service_configs = GenApiConfig(<EOL>service_class_names, hostname=hostname,<EOL>config_string_generator=discovery_generator.DiscoveryGenerator(),<EOL>application_path=application_path)<EOL>for api_name_version, config in service_configs.items():<EOL><INDENT>discovery_name = api_name_version + '<STR_LIT>'<EOL>output_files.append(_WriteFile(output_path, discovery_name, config))<EOL><DEDENT>return output_files<EOL>
Write discovery documents generated from the service classes to file.

    Args:
      service_class_names: A list of fully qualified ProtoRPC service names.
      output_path: The directory to output the discovery docs to.
      hostname: A string hostname which will be used as the default version
        hostname. If no hostname is specificied in the @endpoints.api decorator,
        this value is the fallback. Defaults to None.
      application_path: A string containing the path to the AppEngine app.

    Returns:
      A list of discovery doc filenames.