Skip to main content

Model Serialization (for Form Parameters) Fixed

· One min read

There was a bug in the Node.js SDK in sending complex types (models) as Form Parameters.

In cases of endpoints which accept model instances as form parameters, models were not being serialized properly before making the endpoint call. This resulted in camel-cased field values being passed, disregarding the correct API names.

This behavior has now been fixed. Please generate your SDK again to get the fix.

Details Of Changes

  • Now in case of endpoints which accept models as form parameters, the model's toJSON function is explicitly called before attaching it into the form. This enables the real field names (as defined in the API) to be sent in the request
  • The toJSON function in BaseModel file has been updated to return the correct serialized model object
  • Automatic test case generation has been updated to use the ObjectMapper as well when creating model instances.