Repository  -  API  -  Source


July 10, 2020

Breaking Changes

Other Changes

Full Changelog


March 14, 2020
  • Moved Swagger Parser to the @APIDevTools scope on NPM

  • The "swagger-parser" NPM package is now just a wrapper around the scoped "@apidevtools/swagger-parser" package

Full Changelog


June 22, 2019

Potentially Breaking Changes

Full Changelog


June 12, 2019

Breaking Changes

  • Dropped support for Node 6

  • Updated all code to ES6+ syntax (async/await, template literals, arrow functions, etc.)

  • No longer including a pre-built bundle in the package. such as Webpack, Rollup, Parcel, or Browserify to include Swagger Parser in your app

Other Changes

Full Changelog


October 5, 2018
  • Dropped support for Bower, since it has been deprecated

  • Removed the debug dependency

Full Changelog


May 25, 2018
  • After months and months of delays, initial support for OpenAPI 3.0 is finally here! A big "Thank You!" to Leo Long for doing the work and submitting PR #88.

Full Changelog


April 11, 2018

Full Changelog


October 19, 2017

Breaking Changes

  • Update the Swagger 2.0 JSON schema, so it's possible that an API that previously passed validation may no longer pass due to changes in the Swagger schema

  • To reduce the size of this library, it no longer includes polyfills for Promises and TypedArrays, which are natively supported in the latest versions of Node and web browsers. If you need to support older browsers (such as IE9), then just use this Promise polyfill and this TypedArray polyfill.

Minor Changes

Full Changelog


April 25, 2016

Just one small fix

Fixed issue #13. You can now pass a URL and an object to any method.

SwaggerParser.validate("", mySchemaObject, {})

NOTE: As shown in the example above, you must also pass an options object (even an empty object will work), otherwise, the method signature looks like you're just passing a URL and options.

Full Changelog


April 10, 2016

Plug-ins !!!

That's the major new feature in this version. Originally requested in PR #8, and refined a few times over the past few months, the plug-in API is now finalized and ready to use. You can now define your own resolvers and parsers.

Breaking Changes

The available options have changed, mostly due to the new plug-in API. There's not a one-to-one mapping of old options to new options, so you'll have to read the docs and determine which options you need to set. If any. The out-of-the-box configuration works for most people.

All of the caching options have been removed. Instead, files are now cached by default, and the entire cache is reset for each new parse operation. Caching options may come back in a future release, if there is enough demand for it. If you used the old caching options, please open an issue and explain your use-case and requirements. I need a better understanding of what caching functionality is actually needed by users.

Bug Fixes

Lots of little bug fixes, and a couple major bug fixes:

Full Changelog


October 2, 2015

Updated to the latest version of the Official Swagger 2.0 Schema. The schema hadn't been updated for six months, so Swagger Parser was missing several recent changes.

Full Changelog


October 1, 2015

Swagger Parser now uses call-me-maybe to support promises or callbacks.

Full Changelog


September 28, 2015

Fixed several bugs with circular references, particularly with the validate() method.

Added a new $refs.circular option to determine how circular references are handled. Options are fully-dereferencing them (default), throwing an error, or ignoring them.

Full Changelog


September 25, 2015

This is a complete rewrite of Swagger Parser. Major changes include:

Swagger 2.0 Compliant
Previous versions of Swagger Parser were based on early drafts of Swagger 2.0, and were not compliant with the final version of the spec. Swagger Parser v3.0 is now compliant with the final spec as well as related specs, such as JSON Reference and JSON Pointer

All-New API
The old API only had a single method: parse(). But depending on which options you passed it, the method did much more than its name implied. The new API has separate methods to make things a bit more intuitive. The most commonly used will be validate(), bundle(), and dereference(). The parse() and resolve() methods are also available, but these are mostly just for internal use by the other methods.

Asynchronous API
The old API was "asynchronous", but it relied on global state, so it did not support multiple simultaneous operations. The new API is truly asynchronous and supports both ES6 Promises and Node-style callbacks.

New JSON Schema Validator
Swagger Parser has switched from tv4 to Z-Schema, which is faster and performs more accurate validation. This means that some APIs that previously passed validation will now fail. But that's a good thing!

Full Changelog