joshbalfour / node-cognitive-services

Microsoft® Cognitive Services SDK for Node.JS
https://www.microsoft.com/cognitive-services
MIT License
105 stars 45 forks source link

fix for verifyBody #39

Closed v-geberr closed 6 years ago

v-geberr commented 6 years ago

This PR fixes the situation where an inBody boolean parameter is not required but is passed a value of true and the value of the parameter is a true boolean and not "true".

Comparing boolean values to an array of strings of "TRUE", and "FALSE" is a terrible idea but since it isn't technically broken, I'm not fixing it. I'm just converting the boolean to a string so the comparison works.

miparnisari commented 6 years ago

Yeah i'm not too keen on how we're doing validations at the moment. Might improve it in the future.