wcandillon/swagger-js-codegen

Swagger js codegen Dosent generate header with proper indentation in nodejs

vijaybernad opened this issue · 1 comments

Hi,

I am generating stubs using swagger-js-codegen .Everything is fine but i find error in the stubs that is generating .If we have multiple Header then ,for headers it sets the value as:

headers['Accept'] = ['application/json, application/vnd.il.contents.v1+json']; {invalid header type when we send a POST request}
headers['Content-Type'] = ['application/json,application/vnd.il.contents.v1+json'];

which is wrong ,Actually it should generates the header like the below with proper split

headers['Accept'] = ['application/json', 'application/vnd.il.contents.v1+json'];
headers['Content-Type'] = ['application/json','application/vnd.il.contents.v1+json'];

my spec file has the details like this

"produces": [
"application/json",
"application/vnd.il.accounts.v1+json3"
],
"consumes": [
"application/json"
],

Seems like swagger-js-codegen has a bug.Kindly provide some solution.

Any Updates on this defect