wcandillon / swagger-js-codegen

A Swagger Codegen for typescript, nodejs & angularjs
Apache License 2.0
693 stars 286 forks source link

Add single quotation mark into default value #203

Closed zuhito closed 5 years ago

zuhito commented 6 years ago

I found a bug when I used the following swagger definition of Microsoft Cognitive Services.

https://westus.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/export?DocumentFormat=Swagger&ApiName=Computer%20Vision%20API%20-%20v1.0

I think that single quotation mark is needed in the default value of parameter. Could you check my code and solve it?

zuhito commented 6 years ago

Could you check the code? It's simple bug.

ChrisJamesC commented 6 years ago

What if the default value is not a string ?

zuhito commented 6 years ago

I think that the value is always string. If swagger specification accepts number as the value, I'll add handling to convert string to "string".

zuhito commented 6 years ago

@wcandillon How to solve the problem? I always encounter the problem when I use swagger-js-codegen library. Could you give us any comment about it?

wcandillon commented 6 years ago

@zuhito I'm strongly recommend that you move away from this package in favor of another one, see: https://github.com/wcandillon/swagger-js-codegen#we-are-looking-for-a-new-maintainer