{"id":13402901,"url":"https://github.com/swagger-api/swagger-js","last_synced_at":"2026-02-20T10:05:38.112Z","repository":{"id":2481715,"uuid":"3455070","full_name":"swagger-api/swagger-js","owner":"swagger-api","description":"Javascript library to connect to swagger-enabled APIs via browser or nodejs","archived":false,"fork":false,"pushed_at":"2026-02-12T13:58:07.000Z","size":59665,"stargazers_count":2693,"open_issues_count":72,"forks_count":760,"subscribers_count":84,"default_branch":"master","last_synced_at":"2026-02-12T22:36:55.175Z","etag":null,"topics":["hacktoberfest","javascript","open-source","openapi-specification","openapi3","openapi31","rest","rest-api","swagger","swagger-api","swagger-js","swagger-oss"],"latest_commit_sha":null,"homepage":"http://swagger.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swagger-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2012-02-16T00:08:43.000Z","updated_at":"2026-02-12T13:56:35.000Z","dependencies_parsed_at":"2025-11-27T15:06:00.981Z","dependency_job_id":null,"html_url":"https://github.com/swagger-api/swagger-js","commit_stats":{"total_commits":3432,"total_committers":247,"mean_commits":"13.894736842105264","dds":0.6069347319347319,"last_synced_commit":"5699d5cef85db74be7bbee6bc1ffeeff6be7918b"},"previous_names":["wordnik/swagger-js"],"tags_count":318,"template":false,"template_full_name":null,"purl":"pkg:github/swagger-api/swagger-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swagger-api","download_url":"https://codeload.github.com/swagger-api/swagger-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swagger-api%2Fswagger-js/sbom","scorecard":{"id":530561,"data":{"date":"2025-08-11","repo":{"name":"github.com/swagger-api/swagger-js","commit":"4b6396a2ea59aca122df7a2f1ea45b1a20953573"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7.1,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 30 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: .github/SECURITY.md:1","Info: Found linked content: .github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/SECURITY.md:1","Info: Found text in security policy: .github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'packages' permission set to 'read': .github/workflows/codeql.yml:37","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:40","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:41","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/dependabot-merge.yml:1","Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/codeql.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-merge.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/dependabot-merge.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-merge.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/dependabot-merge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:99: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:113: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/swagger-api/swagger-js/release.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:35","Info:   0 out of  19 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   3 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T05:36:47.354Z","repository_id":2481715,"created_at":"2025-08-20T05:36:47.354Z","updated_at":"2025-08-20T05:36:47.354Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29647768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["hacktoberfest","javascript","open-source","openapi-specification","openapi3","openapi31","rest","rest-api","swagger","swagger-api","swagger-js","swagger-oss"],"created_at":"2024-07-30T19:01:22.664Z","updated_at":"2026-02-20T10:05:38.087Z","avatar_url":"https://github.com/swagger-api.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Helper Components","By Technology","rest-api"],"sub_categories":["JavaScript"],"readme":"# Swagger Client \u003cimg src=\"https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SW-logo-clr.png\" height=\"50\" align=\"right\"\u003e\n\n[![Build Status](https://github.com/swagger-api/swagger-js/actions/workflows/nodejs.yml/badge.svg)](https://github.com/swagger-api/swagger-js/actions)\n\n**Swagger Client** is a JavaScript module that allows you to fetch, resolve, and interact with Swagger/OpenAPI documents.\n\n## New!\n\n**This is the new version of swagger-js, 3.x.** The new version supports Swagger 2.0 as well as OpenAPI 3.\n\nWant to learn more? Check out our [FAQ](docs/migration/migration-2-x-to-3-x.md).\n\nFor features known to be missing from 3.x please see the [Graveyard](docs/migration/graveyard-3-x.md).\n\n\nFor the older version of swagger-js, refer to the [*2.x branch*](https://github.com/swagger-api/swagger-js/tree/2.x).\n\n\u003e *The npm package is called `swagger-client` and the GitHub repository is `swagger-js`.\nWe'll be consolidating that soon. Just giving you the heads-up. You may see references to both names.*\n\n## Compatibility\nThe OpenAPI Specification has undergone multiple revisions since initial creation in 2010. \nCompatibility between Swagger Client and the OpenAPI Specification is as follows:\n\nSwagger Client Version | Release Date | OpenAPI Spec compatibility                    | Notes\n------------------ |--------------|-----------------------------------------------| -----\n3.33.x | 2024-12-30   | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0 | [tag v3.33.0](https://github.com/swagger-api/swagger-js/releases/tag/v3.33.0)\n3.19.x | 2023-01-23   | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0        | [tag v3.19.0-alpha.3](https://github.com/swagger-api/swagger-js/releases/tag/v3.19.0-alpha.3)\n3.10.x | 2020-01-17   | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3               | [tag v3.10.0](https://github.com/swagger-api/swagger-js/tree/v3.10.0)\n2.1.32 | 2017-01-12   | 1.0, 1.1, 1.2                                 | [tag v2.1.32](https://github.com/swagger-api/swagger-js/tree/v2.1.32). This [release](https://github.com/swagger-api/swagger-js/releases/tag/v2.1.32) is only available on GitHub.\n\n## Anonymized analytics\n\nSwagger Client uses [Scarf](https://scarf.sh/) to collect [anonymized installation analytics](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-what-information-does-scarf-js-send-about-me). These analytics help support the maintainers of this library and ONLY run during installation. To [opt out](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-how-can-i-opt-out-of-analytics), you can set the `scarfSettings.enabled` field to `false` in your project's `package.json`:\n\n```\n// package.json\n{\n  // ...\n  \"scarfSettings\": {\n    \"enabled\": false\n  }\n  // ...\n}\n```\n\nAlternatively, you can set the environment variable `SCARF_ANALYTICS` to `false` as part of the environment that installs your npm packages, e.g., `SCARF_ANALYTICS=false npm install`.\n\n## Documentation\n\n#### Usage\n\n- [Installation](docs/usage/installation.md)\n- [Tags Interface](docs/usage/tags-interface.md)\n- [HTTP client for OAS operations](docs/usage/http-client-for-oas-operations.md)\n- [OpenAPI Definition Resolver](docs/usage/openapi-definition-resolver.md)\n- [HTTP Client](docs/usage/http-client.md)\n- [Swagger Client API](docs/usage/api.md)\n\n#### Development\n\n- [Contributing](https://github.com/swagger-api/.github/blob/master/CONTRIBUTING.md)\n- [Setting up](docs/development/setting-up.md)\n- [Scripts](docs/development/scripts.md)\n\n#### Migrations \n\n- [Migration guide](docs/migration/migration-2-x-to-3-x.md)\n- [Graveyard](docs/migration/graveyard-3-x.md)\n\n### Runtime \n\n### Node.js\n\n`swagger-client` requires Node.js `\u003e=12.20.0` and uses different `fetch` implementation depending\non Node.js version.\n\n- `\u003e=12.20.0 \u003c18` - [node-fetch@3](https://www.npmjs.com/package/node-fetch) \n- `\u003e=18` - [native Node.js fetch](https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#fetch)\n\n\u003e NOTE: swagger-client minimum Node.js runtime version aligns with [Node.js Releases](https://nodejs.org/en/about/releases/)\n\u003e which means that we can drop support for **EOL** (End Of Life) Node.js versions without doing major version bump.\n\n### Browsers\n\n`swagger-client` works in the latest versions of Chrome, Safari, Firefox, and Edge\nand uses [native fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) implementation\nprovided by each supported browser.\n\n## Security contact\n\nPlease disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fswagger-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswagger-api%2Fswagger-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagger-api%2Fswagger-js/lists"}