swagger-tools icon indicating copy to clipboard operation
swagger-tools copied to clipboard

Fix Issue 486: For a POST with body taking an array of strings, elements of the array can be improperly coerced into numeric values.

Open mlitwin opened this issue 7 years ago • 1 comments

In swagger 2, a parameter in body will have a .schema, rather than be a schema: http://swagger.io/specification/#parameterObject getParameterType() is already savvy to this, so we do what it does for the schema.

Without this, you get a bogus schema, which eventually leads to converValue thinnking it's got an object type (the default), and attempting to JSON.stringify the nice string into an object.

mlitwin avatar Apr 14 '17 20:04 mlitwin

I'll give it a peek when releasing in a few days.

whitlockjc avatar Apr 14 '17 21:04 whitlockjc