swagger-tools
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.
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.
I'll give it a peek when releasing in a few days.