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.
- A property
additionalPropertiesand a function
addAdditionalPropertyhave been added to model classes to store additional model properties.
additionalPropertieswhich has been added to model classes is an associative array. It stores key-value pairs in an array.
toJSONfunction in model classes now includes additional model properties in the serialized model that it returns. When called, it will return all addtional properties added to the model as individual properties. Array of additional properties will not be returned.
ObjectMapperclass has functionality added to cater for additional properties when mapping model properties.
- A flag (function parameter) has been added to
ObjectMapperclass due to which controllers' call to
mapObjecthas been updated as well.
This feature is now supported in all language SDKs except AngularJS and Go.