{"id":22982348,"url":"https://github.com/niradler/apigateway-export-tool","last_synced_at":"2025-04-02T09:46:00.328Z","repository":{"id":46063981,"uuid":"182887705","full_name":"niradler/apigateway-export-tool","owner":"niradler","description":"export apigateway docs.","archived":false,"fork":false,"pushed_at":"2023-04-10T20:26:59.000Z","size":26,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T01:47:00.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/apigateway-export-tool","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niradler.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-23T00:16:53.000Z","updated_at":"2021-11-16T21:55:27.000Z","dependencies_parsed_at":"2022-09-17T23:22:45.303Z","dependency_job_id":null,"html_url":"https://github.com/niradler/apigateway-export-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fapigateway-export-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fapigateway-export-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fapigateway-export-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fapigateway-export-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niradler","download_url":"https://codeload.github.com/niradler/apigateway-export-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246794103,"owners_count":20834931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T02:17:58.834Z","updated_at":"2025-04-02T09:46:00.313Z","avatar_url":"https://github.com/niradler.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apigateway-export-tool\n\n## Usage CLI\n\n```\nUsage: apigateway-export-tool [command]\n\nOptions:\n  -V, --version     output the version number\n  -h, --help        output usage information\n\nCommands:\n  docs [options]    Download docs file for a given restApiId.\n  list [options]    List all restApis.\n  stages [options]  Get stages for a given restApiId.\n  sdk [options]     Download sdk for a given restApiId.\n```\n\n```\nnpx apigateway-export-tool list\nnpx apigateway-export-tool docs -h\nnpx apigateway-export-tool docs -i 123123 -stageName prod\n```\n\n## Usage Nodejs\n\n```\n// checkout examples https://github.com/niradler/apigateway-export-tool/blob/master/test.js\nconst { getExportAndSave,\n  getExport,\n  setAwsConfig,\n  getRestApis,\n  getSdk,\n  getSdkAndSave,\n  getStages,\n  importDocumentation\n  } = require(\"apigateway-export-tool\");\nsetAwsConfig({ region: \"us-east-1\" });\n\n(async function() {\n  const params = {\n    exportType, // String (\"oas30\", \"swagger\")\n    restApiId, // String\n    stageName, // String\n    parameters: {\n      extensions // String (\"postman\", \"integrations\", \"integrations\", \"authorizers\")\n    }\n  };\n  const filePath = \"./\";\n  const apis = await getRestApis();\n  const apis = await getStages(params);\n  const apis = await importDocumentation(params);\n  const file = await getExportAndSave(params, filePath); //save the file in path.\n  const file = await getExport(params); // just returning the file.\n})();\n\n```\n\n### AWS credentials\n\nif you have aws cli configure on your machine you dont need to worry about that,\nif not you can setup the credentials using one of this two options:\n\n- Loaded from the shared credentials file (~/.aws/credentials)\n- Loaded from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniradler%2Fapigateway-export-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniradler%2Fapigateway-export-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniradler%2Fapigateway-export-tool/lists"}