We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad1ceaf commit 4b66368Copy full SHA for 4b66368
api/v3.0.0/routes.json
@@ -529,6 +529,7 @@
529
"content": {
530
"type": "String",
531
"required": true,
532
+ "allow-empty": true,
533
"validation": "",
534
"invalidmsg": "",
535
"description": ""
index.js
@@ -259,7 +259,7 @@ var Client = module.exports = function(config) {
259
if (typeof value != "boolean" && !value) {
260
// we don't need to validation for undefined parameter values
261
// that are not required.
262
- if (!def.required)
+ if (!def.required || (def["allow-empty"] && value === ""))
263
continue;
264
throw new error.BadRequest("Empty value for parameter '" +
265
paramName + "': " + value);
0 commit comments