Skip to content

Commit 4b66368

Browse files
committed
Allow for empty strings in create-blob API call
1 parent ad1ceaf commit 4b66368

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

api/v3.0.0/routes.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@
529529
"content": {
530530
"type": "String",
531531
"required": true,
532+
"allow-empty": true,
532533
"validation": "",
533534
"invalidmsg": "",
534535
"description": ""

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ var Client = module.exports = function(config) {
259259
if (typeof value != "boolean" && !value) {
260260
// we don't need to validation for undefined parameter values
261261
// that are not required.
262-
if (!def.required)
262+
if (!def.required || (def["allow-empty"] && value === ""))
263263
continue;
264264
throw new error.BadRequest("Empty value for parameter '" +
265265
paramName + "': " + value);

0 commit comments

Comments
 (0)