def generate_documentation(self, app_name, **kwargs):
output_file = kwargs.get('<STR_LIT>')<EOL>encoding = kwargs.get('<STR_LIT>', '<STR_LIT:utf-8>')<EOL>doc_string = generate_markdown_doc(app_name, self)<EOL>if output_file:<EOL><INDENT>with open(output_file, '<STR_LIT:w>', encoding=encoding) as doc_file:<EOL><INDENT>doc_file.write(doc_string)<EOL><DEDENT><DEDENT>return doc_string<EOL>
Generate documentation for this specification.

        Documentation is generated in Markdown format. An example
        of the generated documentation can be found at:

        https://github.com/loganasherjones/yapconf/blob/master/example/doc.md

        Args:
            app_name (str): The name of your application.

        Keyword Args:
            output_file_name (str): If provided, will write to this file.
            encoding (str): The encoding to use for the output file. Default
            is utf-8.

        Returns:
            A string representation of the documentation.