def get_api_docs(routes):
routes = map(_get_tuple_from_route, routes)<EOL>documentation = []<EOL>for url, rh, methods in sorted(routes, key=lambda a: a[<NUM_LIT:0>]):<EOL><INDENT>if issubclass(rh, APIHandler):<EOL><INDENT>documentation.append(_get_route_doc(url, rh, methods))<EOL><DEDENT><DEDENT>documentation = (<EOL>"<STR_LIT>" +<EOL>"<STR_LIT>" +<EOL>"<STR_LIT>" +<EOL>"<STR_LIT>".join(documentation)<EOL>)<EOL>return documentation<EOL>
Generates GitHub Markdown formatted API documentation using
provided schemas in RequestHandler methods and their docstrings.

:type  routes: [(url, RequestHandler), ...]
:param routes: List of routes (this is ideally all possible routes of the
    app)
:rtype: str
:returns: generated GFM-formatted documentation