Closed willshulman closed 7 years ago
:selfie: 2aac3d27d664fb2f83be05080798d80cb03a4bf8
I feel like this test could one day pass even if the typeof(req.parameters.bar) !== 'string', but want to look at test case more closely.
For example if the HTTP client underlying this test for some reason returned a string (perhaps a bug in that client) then this test would pass even though the parameter parser let an object sneak through.
Maybe an additional explicit typeof test?
those tests are here: https://github.com/carbon-io/carbond/blob/master/test/ParameterParsingTests.js#L193
Ah. Ok closing ticket.
Right now the parser parses "{}" as a string if the defined schema of the parameter is a string.
{x: "{$gt : 3}"}
and not{x: { $gt: 3 }}
.-will