schemas/notebook.json in losant_rest-1.9.1 vs schemas/notebook.json in losant_rest-1.9.2

- old
+ new

@@ -52,39 +52,69 @@ "enum": [ "deviceData" ] }, "fileName": { - "type": "string", - "pattern": "^[0-9a-zA-Z_.-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "deviceTags": { "type": "array", + "maxItems": 100, "items": { "type": "object", "properties": { "key": { - "type": "string", - "pattern": "^[0-9a-zA-Z_-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^[0-9a-zA-Z_-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "value": { "type": "string", "minLength": 1, "maxLength": 255 } }, "additionalProperties": false - }, - "maxItems": 100 + } }, "deviceIds": { "type": "array", + "maxItems": 100, "items": { - "type": "string", - "pattern": "^[A-Fa-f\\d]{24}$" - }, - "maxItems": 1000 + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Fa-f\\d]{24}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] + } }, "attributes": { "type": "array", "maxItems": 100, "items": { @@ -115,39 +145,69 @@ "enum": [ "deviceMetadata" ] }, "fileName": { - "type": "string", - "pattern": "^[0-9a-zA-Z_.-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "deviceTags": { "type": "array", + "maxItems": 100, "items": { "type": "object", "properties": { "key": { - "type": "string", - "pattern": "^[0-9a-zA-Z_-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^[0-9a-zA-Z_-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "value": { "type": "string", "minLength": 1, "maxLength": 255 } }, "additionalProperties": false - }, - "maxItems": 100 + } }, "deviceIds": { "type": "array", + "maxItems": 100, "items": { - "type": "string", - "pattern": "^[A-Fa-f\\d]{24}$" - }, - "maxItems": 1000 + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Fa-f\\d]{24}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] + } } }, "required": [ "inputType", "fileName" @@ -162,16 +222,36 @@ "enum": [ "dataTable" ] }, "fileName": { - "type": "string", - "pattern": "^[0-9a-zA-Z_.-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "dataTableId": { - "type": "string", - "pattern": "^[A-Fa-f\\d]{24}$" + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Fa-f\\d]{24}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "queryJson": { "type": "string", "maxLength": 32767 } @@ -187,17 +267,61 @@ "type": "object", "properties": { "inputType": { "type": "string", "enum": [ - "externalUrl" + "eventData" ] }, "fileName": { + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] + }, + "queryJson": { "type": "string", - "pattern": "^[0-9a-zA-Z_.-]{1,255}$" + "maxLength": 32767 + } + }, + "required": [ + "inputType", + "fileName" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "inputType": { + "type": "string", + "enum": [ + "externalUrl" + ] }, + "fileName": { + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] + }, "sourceUrl": { "type": "string", "minLength": 1, "maxLength": 1024 } @@ -225,16 +349,36 @@ "enum": [ "dataTable" ] }, "fileName": { - "type": "string", - "pattern": "^[0-9a-zA-Z_.-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "dataTableId": { - "type": "string", - "pattern": "^[A-Fa-f\\d]{24}$" + "oneOf": [ + { + "type": "string", + "pattern": "^[A-Fa-f\\d]{24}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "createMissingColumns": { "type": "boolean" }, "truncateExistingTable": { @@ -256,12 +400,22 @@ "enum": [ "file" ] }, "fileName": { - "type": "string", - "pattern": "^[0-9a-zA-Z_.-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "destinationDirectoryTemplate": { "type": "string", "minLength": 1, "maxLength": 1024 @@ -287,11 +441,21 @@ "enum": [ "directory" ] }, "directoryName": { - "type": "string", - "pattern": "^[0-9a-zA-Z_.-]{1,255}$" + "oneOf": [ + { + "type": "string", + "pattern": "^(?!\\.{1,2}$)[0-9a-zA-Z_.-]{1,255}$" + }, + { + "type": "string", + "minLength": 4, + "maxLength": 255, + "pattern": ".*{{.+}}.*" + } + ] }, "destinationDirectoryTemplate": { "type": "string", "minLength": 1, "maxLength": 1024 \ No newline at end of file