Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger js codegen Dosent generate header with proper indentation in nodejs #197

Open
vijaybernad opened this issue Oct 16, 2017 · 1 comment

Comments

@vijaybernad
Copy link

vijaybernad commented Oct 16, 2017

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.

@vijaybernad
Copy link
Author

Any Updates on this defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant