Skip to content

Swagger js 2.1.0-M2 Released!

Compare
Choose a tag to compare
@fehguy fehguy released this 29 Mar 00:11
· 3559 commits to master since this release

Swagger-client 2.1.0-M2 Released!

This is a major refactor of swagger-client to add better support for Swagger 2.0 specifications and the new features that come with it. In addition, we have shrunk the library considerably, added much more robust test coverage and removed dead code. This effort was only made possible by support from Apigee and their folks @mohsen1 and @whitlockjc. Many thanks for supporting the project! The entire community benefits from your support.

Usage notes

Note! There are some differences in the API between 2.1.x-M1 and 2.1.x-M2. For example, 1.x version swagger specifications are now converted into 2.0 versions. That means features such as multiple base paths are no longer supported! Please do not upgrade to 2.1.x-M2 if this change isn't acceptable. It will not be coming back in subsequent releases.

In converting from 1.x specs to 2.0, the resourcePath (location where the documentation for an Api was declared) is now used to develop a tag in the 2.0 specification world.

Major changes

The build process is now using gulp with mocha tests. It is now packaged in a single library (minified version available) using browserify, and is a proper npm.js package. We have also greatly enhanced the interactive help inside the client buy supporting .help() on the client, tags, and operations.

Notable features

  • #160, #183, #258, #270 Added ref support for parameters, models, model properties. You can now use the Swagger 2.0 remote reference support for models, properties, paths and parameters.
  • #178 Removed global variables. You can now have multiple instances of swagger-client in your app without sharing authorizations, etc.
  • #182 merged 1.x and 2.0 support, including support for "single-file" 1.x specifications. This resulted in removing almost half the code in the project.
  • #189 Added support for in-line schemas
  • #208 Build with gulp, browserify. now a single library can be deployed for your webapps.
  • #267 Switched from shred to super-agent. Dropped need for jQuery as super-agent now has universal client support.
  • #277 Added response headers to response model description

Notable bug fixes

  • #234 deprecated is now shown correctly
  • #194 fixed issue where reserved names were clobbering functions
  • #327 auto-generate operationId if not present
  • #328 more graceful handling of CORS issues when loading swagger-client

Please open any issues directly in github and send pull-requests to the develop_2.0 branch!

Limitations

There are some unimplemented features of the swagger 2.0 specification in this release. Please see the Milestones and Issues for the final 2.1.0 release.