def make_swagger(apis, binary_media_types=None):
swagger = {<EOL>"<STR_LIT>": {<EOL>}<EOL>}<EOL>for api in apis:<EOL><INDENT>swagger["<STR_LIT>"].setdefault(api.path, {})<EOL>integration = {<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:type>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>".format(api.function_name)  <EOL>}<EOL>}<EOL>method = api.method<EOL>if method.lower() == "<STR_LIT>":<EOL><INDENT>method = "<STR_LIT>"<EOL><DEDENT>swagger["<STR_LIT>"][api.path][method] = integration<EOL><DEDENT>if binary_media_types:<EOL><INDENT>swagger["<STR_LIT>"] = binary_media_types<EOL><DEDENT>return swagger<EOL>
Given a list of API configurations named tuples, returns a Swagger document

Parameters
----------
apis : list of samcli.commands.local.lib.provider.Api
binary_media_types : list of str

Returns
-------
dict
    Swagger document