Changelog / NODEJS

This changelog is filtered to show only changes for NODEJS. Go back to full changelog.

May 3, 2017

Model Classes Code Improved

We’ve made an improvement to how model properties are now generated in the code. The generated SDK now contains both camel case-d version of the property name and the actual property name (where applicable).
Read on to find more details about the change.

Please generate your SDK again to get the improved code.


Apr 23, 2017

ES6 Promises in NodeJS

NodeJS SDKs will now return promises in endpoint calls, as an alternative to accepting callbacks.

  • We use ES6 Promises which is based on Promises/A+ and is interoperable with most Promise-based implementations.
  • Callbacks are still supported (for backward-compatibility) but are now optional.

Re-generate your NodeJS SDK to get the new Promise-enabled SDK implementation now.


Apr 19, 2017

Additional Model Properties Support in Node SDK

NodeJS SDKs can now optionally preserve additional properties returned in the response. This setting can be enabled via Settings > CodeGen Settings page in the API editor and turning on the Enable Additional Model Properties flag.

Apr 12, 2017

Node.js Circular Dependency Fix

We have changed the structure of the SDK to break cyclic dependencies. Due to this, the following changes have been made:

  • Model deserialization logic has moved out from model classes.
  • We have added new files ObjectMapper.js and ModelFactory.js to the sdk.
  • Exception handling in BaseController has changed to use ObjectMapper.
  • BaseModel is now being used to assign values to model properties (when model class is directly instantiated)
  • BaseController is not being exposed by the API Client now.

Please generate your SDK again to get the improved code.


Apr 3, 2017

Adopting AirBnb JS Style Guide and ES6 Primitives

Keeping with our tradition of Continuous Improvement, we are proud to announce a major revamp of NodeJS SDKs!

  • Our code now conforms with Airbnb’s JavaScript Style Guide.
  • We are using ES6 classes, along with other ES6 primitives.
  • You can run npm run lint to lint your code immediately.
  • We generate CI/CD files for Travis, CircleCi, Appveyor and Jenkins to run NodeJS tests.

Please generate your SDK again if you want the improved ES6 based code.


Feb 27, 2017

Multiple Bug Fixes for Node SDK

Multiple bugs were identified and fixed for Node SDK. A summary of all bugs is given below with some details about each:

  • There was a bug in printing multi-line string literals in controller files.
  • In Controller files, string encoding for headers had some issues.
  • Exception Class imports within Controllers were printed with invalid exception class names.
  • Moment.js (for Date/Datetime) import statement was not being handled properly.
  • Imports for Server.js and Environment.js file in index.js will now only be included if multiple base urls are specified in the API description.
  • Exception Class files’ constructor function code has improved.
  • API Exception’s constructor function code has improved.
  • Models or model properties which are being used in endpoints (such as parameters) are now being imported properly in the Controllers. Transitive imports are handled as well (if one model requires another, both are included in the controller).
  • Custom Type imports in model files have also been fixed now. If a custom type inherits from another custom type or contains an object of another custom type, that custom type is included in the model file. This import logic has been fixed.
  • Code in the Request Client file was not generating properly for Superagent client. Code for retries was being added even through retries were not enabled. This bug has been fixed.

All the above mentioned bugs have been fixed. We recommend generating Node SDK again to get all these bug fixes and minor code improvements.


Feb 6, 2017

Multiple Datetime Formats in SDKs

We have now added support for multiple datetime formats in our SDKs. The following formats are supported:

  • RFC1123 Datetime (Mon, 15 Jun 2009 20:45:30 GMT)
  • RFC3339 Datetime (2016-03-13T12:52:32.123Z)
  • Unix Timestamp (1480809600)

Feb 2, 2017

Node Index File Import Bug Fix

There was a bug in the index file of the generated SDK. The import for configuration.js was not handled correctly. This bug was causing trouble in using the properties and functions exported from configuration.js.

You may generate your SDK again to get this bug fix.


Feb 2, 2017

Model Imports Bug Fix In Node

We encountered an error with custom types import in our Node SDK (with test cases). Custom Types which had spaces in between 2 words like Custom Type, or any special characters in their name were not being generated correctly. Causing the SDK to break.

This bug has been fixed now. Please regenerate your SDK if you encountered this bug.


Jan 31, 2017

NodeJS SDKs Now Have Retries

Node JS SDKs now come with retries for requests. We allow retries for the following cases:

  • GET requests only.
  • General connection errors.
  • Timeout errors.
  • DNS address resolution failure errors.

Re-generate your Node JS SDKs now to get this new feature.