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

- old
+ new

@@ -24,39 +24,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": { @@ -87,39 +117,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" @@ -134,16 +194,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 } @@ -159,17 +239,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 } @@ -197,16 +321,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": { @@ -228,12 +372,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 @@ -259,11 +413,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