- Notifications
You must be signed in to change notification settings - Fork765
Javascript library to connect to swagger-enabled APIs via browser or nodejs
License
swagger-api/swagger-js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Swagger Client is a JavaScript module that allows you to fetch, resolve, and interact with Swagger/OpenAPI documents.
This is the new version of swagger-js, 3.x. The new version supports Swagger 2.0 as well as OpenAPI 3.
Want to learn more? Check out ourFAQ.
For features known to be missing from 3.x please see theGraveyard.
For the older version of swagger-js, refer to the2.x branch.
The npm package is called
swagger-clientand the GitHub repository isswagger-js.We'll be consolidating that soon. Just giving you the heads-up. You may see references to both names.
The OpenAPI Specification has undergone multiple revisions since initial creation in 2010.Compatibility between Swagger Client and the OpenAPI Specification is as follows:
| Swagger Client Version | Release Date | OpenAPI Spec compatibility | Notes |
|---|---|---|---|
| 3.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 |
| 3.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 |
| 3.10.x | 2020-01-17 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | tag v3.10.0 |
| 2.1.32 | 2017-01-12 | 1.0, 1.1, 1.2 | tag v2.1.32. Thisrelease is only available on GitHub. |
Swagger Client usesScarf to collectanonymized installation analytics. These analytics help support the maintainers of this library and ONLY run during installation. Toopt out, you can set thescarfSettings.enabled field tofalse in your project'spackage.json:
// package.json{ // ... "scarfSettings": { "enabled": false } // ...}Alternatively, you can set the environment variableSCARF_ANALYTICS tofalse as part of the environment that installs your npm packages, e.g.,SCARF_ANALYTICS=false npm install.
- Installation
- Tags Interface
- HTTP client for OAS operations
- OpenAPI Definition Resolver
- HTTP Client
- Swagger Client API
swagger-client requires Node.js>=12.20.0 and uses differentfetch implementation dependingon Node.js version.
>=12.20.0 <18-node-fetch@3>=18-native Node.js fetch
NOTE: swagger-client minimum Node.js runtime version aligns withNode.js Releaseswhich means that we can drop support forEOL (End Of Life) Node.js versions without doing major version bump.
swagger-client works in the latest versions of Chrome, Safari, Firefox, and Edgeand usesnative fetch implementationprovided by each supported browser.
Please disclose any security-related issues or vulnerabilities by emailingsecurity@swagger.io, instead of using the public issue tracker.
About
Javascript library to connect to swagger-enabled APIs via browser or nodejs
Topics
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
