{"id":16259984,"url":"https://github.com/songlin123/api-codegen","last_synced_at":"2026-02-04T22:34:42.186Z","repository":{"id":42799672,"uuid":"271755384","full_name":"SongLin123/api-codegen","owner":"SongLin123","description":"根据 swagger 文档生成js api文件（只兼容openAPI 2.0）","archived":false,"fork":false,"pushed_at":"2023-07-11T06:51:13.000Z","size":482,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-14T03:05:27.871Z","etag":null,"topics":["nodejs","npm-package","openapi2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SongLin123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-12T09:03:56.000Z","updated_at":"2023-07-11T06:51:18.000Z","dependencies_parsed_at":"2024-10-27T21:37:43.889Z","dependency_job_id":"e33558b1-9819-4122-952a-ae1fc3a5ac6d","html_url":"https://github.com/SongLin123/api-codegen","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.26086956521739135","last_synced_commit":"cc73be117212d6aecadac1141f3c50c227b893a7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SongLin123/api-codegen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongLin123%2Fapi-codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongLin123%2Fapi-codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongLin123%2Fapi-codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongLin123%2Fapi-codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SongLin123","download_url":"https://codeload.github.com/SongLin123/api-codegen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongLin123%2Fapi-codegen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29098236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T21:05:08.033Z","status":"ssl_error","status_checked_at":"2026-02-04T21:04:53.031Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["nodejs","npm-package","openapi2"],"created_at":"2024-10-10T16:05:57.561Z","updated_at":"2026-02-04T22:34:42.171Z","avatar_url":"https://github.com/SongLin123.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n * @Date: 2020-06-12 17:04:42\n * @LastEditors: songlin\n * @LastEditTime: 2020-06-15 13:23:35\n * @FilePath: \\codegen\\README.md\n--\u003e \n# api-codegen\n 根据swagger文档生成js api文件,基于axios库的请求\n 不生成基础index.js和请求响应拦截器，请根据需求灵活配置\n 提供示例的api目录，在/api目录下\n\n## 使用\n``` shell\nnpm i -g songlin-api-codegen\n\napi-codegen ./config.json\n```\n\n\u003e 可以使用多配置文件应对多服务的场景，例如\n```\napi-codegen ./service1.json\n\napi-codegen ./service2.json\n\napi-codegen ./service3.json\n\n```\n ## 配置\n \n ``` \n {      // 根路径为执行api-codegen的路径\n     // api-docs 位置\n     // 可以使用本地路径，如 ./api-docs.json.\n    \"api\": \"http://127.0.0.1:5500/api-docs.json\",\n    // 生成的code的位置，重复执行命令会删掉路径下之前生成的目录\n    \"targetPath\": \"./api/modules/\"\n}\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonglin123%2Fapi-codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonglin123%2Fapi-codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonglin123%2Fapi-codegen/lists"}