javascript - How to properly set the data in swagger-js client for a PUT request which requires BOTH formData and path parameters? -
i have method requires both formdata , path parameters. how can set data in request?
i using swagger-js v2.
let's example below requires 3 parameters:
resetpassword
path parameterpassword
formdata parameterrepeat_password
formdata parameter
swagger_client.apis.users.resetpassword(<help!!>, function(response) { // success }, function(err) { // failure });
i'm not sure if still relevant stucked @ same problem , found solution.
define parameter object this:
var paramobj = { resetpassword: "resetpw", parametercontenttype: "multipart/form-data", password: formdata1, repeat_password: formdata2 };
then call with
swagger_client.apis.users.resetpassword(paramobj,...
Comments
Post a Comment