We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related to https://github.com/bugventure/jsen/issues/52
https://github.com/bugventure/jsen/issues/52
This will be a breaking change, and require changes to monocle-api and the applications using it.
diff --git a/lib/RequestRouter.js b/lib/RequestRouter.js index e981568..822bcf4 100644 --- a/lib/RequestRouter.js +++ b/lib/RequestRouter.js @@ -209,6 +209,10 @@ function cleanParamKey(key) { function castParam(key, value, type) { var hasTypeError = false; + if (!type || !type.indexOf) { + // Type is not string or array? + return value; + } if (type.indexOf('boolean') !== -1) { switch(value) { diff --git a/test/lib/Router_test.js b/test/lib/Router_test.js index 9bae87f..7468d34 100644 --- a/test/lib/Router_test.js +++ b/test/lib/Router_test.js @@ -805,7 +805,7 @@ describe('API Router', function() { this.meeSchema = { type: 'object', properties: { - floatParam: {type: 'float'} + floatParam: {type: 'number'} } }; @@ -1712,7 +1712,7 @@ describe('API Router', function() { } }, param4: {type: 'integer'}, - param5: {type: 'date-time'} + param5: {format: 'date-time'} } }; this.postObjSpy = sinon.spy(function(request, connection) {
The text was updated successfully, but these errors were encountered:
Noticed while working on #85
Sorry, something went wrong.
No branches or pull requests
Related to
https://github.com/bugventure/jsen/issues/52
This will be a breaking change, and require changes to monocle-api and the applications using it.
The text was updated successfully, but these errors were encountered: