Releases: swagger-api/swagger-js
Swagger-js 2.1.7 has been released!
This version of swagger-js improves reliability, shrinks library size, and brings promise support for a clean interface.
Notable Features
- Added support for promises #524, #576
- Documentation enhancements for error responses #531, promises
- Better support for nested schemas #535
- Added parsed object with non-2xx responses #549
- Shrunk library size by removing jQuery from distribution #580, #589
- Path-level parameters are now resolved #584
- Handling duplicate
operationId
s #595 - Added request interceptor #632
Notable Fixes
Swagger-js 2.1.5 has been released!
Swagger-js 2.1.3 has been released!
This minor fix addresses #552 which provides support for parameter macros
Swagger-js 2.1.2 has been released!
Minor features and helpful bug fixes have been addressed in this release.
Notable Features
#530 allowing overwriting of headers in security definitions
#532 overriding of host
and basePath
after initialization
Notable bug fixes
#504 fixed asCurl
bug for Accept and Content-Type
#487 authorization regression with multiple criteria
#476 fixed minified version
#480 simplified password authorization instantiation
#239 made swaggerHttp pluggable
Swagger-js 2.1.1 has been released!
The first formal release of Swagger 2.0 support in the javascript library. This project is used extensively by swagger-ui for communicating with swagger-enabled servers. There are many changes between this release and previous 2.0.x versions.
Swagger-js and other formal swagger projects have had intermediate, milestone releases supporting the swagger 2.0 specification. This version supersedes the previous milestones in accordance with the semver strategy.
Usage notes
Swagger-js introduces a new constructor. Instead of passing all arguments in the constructor of swagger-client, the preferred mechanism for instantiation is as follows:
var client = new SwaggerClient();
client.initialize(url, options);
The existing constructor is still supported.
Major changes
There is now a general resolver
class which is responsible for finding remote references to other objects and bringing them into a single, canonical swagger instance. This step also allows for resolving allOf
and other modeling features.
You can now pass in a javascript object representing a swagger description. This means remote calls are not necessary when initializing the client to read the spec (#408).
Swagger HTTP is now pluggable. That means you can create your own transports to replace the existing superagent
or jquery
based HTTP clients (#239).
YAML is now a first-class format in both core and remote, shared references #323
Notable features
- allOf composition and inheritence support added to top-level
/definitions
(note, recursiveallOf
support is not implemented, nor isallOf
enabled for inline models) #455, #188 - Remote references for models, model properties, parameters, operations now supported, #433, #460, #417
- Response interceptors can now post-process responses from API calls, #126
- Support for array collection formats #191
- Support for referenced path parameters, #360
- Response headers are now exposed in response models #293
- Better handling of data types, #341, #353, #339, #343
- Better display of model description, #294
- Posting empty body with
application/json
will now send empty object{}
#326 - Better handling of missing parameters, #375
Notable bug fixes
- No more global swagger-client instance #350
- basePath issue for v1.x specs fixed #346
- enabled default callbacks #308
- enabled macro support for operations, models #307
- Authorizations now follow the spec, #283
- Enum enhancements, fixes #391
- Global consumes, produces now supported #367
- Use of reserved words no longer cause a failure to build client #405
- Read-only attriubutes in model are no longer shown as
optional
#297 - Better translation of
enum
from 1.x specs #376 - Https in basepath supported #398
Limitations
Find any? Please send bug reports and pull-requests to the develop_2.0
branch!
Swagger js 2.1.0-M2 Released!
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
tosuper-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.
Swagger 2.1.5-M1 released!
A patch release for swagger-client has been released to address corner cases and add new functionality
New features:
- Support for the tag object from the 2.0 swagger spec, including description and external docs #243
- Options passed to underlying HTTP library by caller #229
Issues fixed:
Swagger-js v2.1.1-M1 Released!
The Swagger team is proud to announce the M1 release of three of our main libraries and tools: swagger-js, swagger-ui and swagger-core. All release provide official initial support for Swagger 2.0’s main features. The missing features will be added in the next milestone releases until the final release is available.
In order to better improve these libraries and tools, we ask that you start using them and provide us with feedback in form of issues on the github repository. The issues are a huge help in finding what’s missing or not working properly (though note some issues are already submitted). We would also appreciate any PRs that improve existing or new tickets.
These releases could not have happened without the intensive support of the Swagger community. Each of the projects had a few PRs that really helped us push these projects forward!
Be aware that the release notes contain the notable changes, but there may some changes that we missed in the list.
Notable Features:
- Available on npmjs.org
- First official milestone release of Swagger 2.0 support. Backwards compatible with Swagger 1.2.
- Unified API to initialize either 1.1, 1.2, 2.0 clients.
- Replace cake with gulp as the build tool.
- Rebuild the test framework with mocha and pure javascript.
- Addressed syntax issues which were breaking older versions of Internet Explorer
- Allow for repeated models of the same type in sample objects.
- Provide a example value for ‘date’ format.
- Please note that 2.1.1-M1 lives in Master
Notable Bug Fixes:
- Fixed query parameter encoding (#210)
- Fixed usage of content-type (#192)
- Fixed support for multi params with brackets (#191)
- Add array schema support (#147)
- Fix consumes/produces property propagation (#138)
- Added asCurl, mock modes for testing and debugging
Breaking Changes:
- The 1.x class, SwaggerApi, has been replaced with a unified SwaggerClient class.
Limitations: - There are 2.0 features which are NOT implemented, as described in the [milestones](https://github.com/swagger-api/swagger-js/milestones page)
v2.0.48
Swagger 2.0.48 has been released!
New features
- Refactored test framework. Now using mocha (#193)
- Added better support for sample JSON macros. You can provide interceptors to dynamically populate both model properties as well as operation parameters (#177)
- Added support for asCurl documentation, to show what a curl command would be based on any swagger operation. Includes headers, params, etc (#174)
- Default success and error callbacks implemented (#130)
- Configurable accept header when fetching swagger specifications (#120)
- Removed
global
scope for authorizations, allowing swagger-client to support multiple APIs in a single deployment (#109) - Added pass-through of
opts
when making requests
Defects fixed:
Please see https://groups.google.com/forum/#!forum/swagger-swaggersocket for the swagger google group, or http://webchat.freenode.net/?channels=swagger for IRC