Releases: swagger-api/swagger-js
Swagger-js 2.1.13 has been released!
Swagger-js 2.1.11 has been released!
Swagger-js 2.1.10 has been released!
This minor release addresses an issue that would cause swagger-ui to fail to show error messages (#668)
Swagger-js 2.1.9 has been released!
Swagger-js 2.1.8 has been released!
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!