diff --git a/packages/json_schemas/schemas/input.schema.json b/packages/json_schemas/schemas/input.schema.json index 7776e7ac..b6b7c20d 100644 --- a/packages/json_schemas/schemas/input.schema.json +++ b/packages/json_schemas/schemas/input.schema.json @@ -179,7 +179,7 @@ "type": "object", "properties": { "type": { "enum": ["array"] }, - "editor": { "enum": ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "select", "schemaBased", "hidden"] }, + "editor": { "enum": ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "fileupload", "select", "schemaBased", "hidden"] }, "isSecret": { "type": "boolean" } }, "required": ["type", "title", "description", "editor"], @@ -225,6 +225,13 @@ "items": { "$ref": "#/definitions/arrayItemsKeyValue" } } }, + { + "required": ["editor"], + "properties": { + "editor": { "enum": ["fileupload"] }, + "items": { "$ref": "#/definitions/arrayItemsFileupload" } + } + }, { "required": ["editor"], "properties": { @@ -679,7 +686,7 @@ "type": "object", "properties": { "type": { "enum": ["array"] }, - "editor": { "enum": ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "select", "hidden"] }, + "editor": { "enum": ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "fileupload", "select", "hidden"] }, "title": { "type": "string" }, "description": { "type": "string" }, "nullable": { "type": "boolean" }, @@ -708,6 +715,13 @@ "items": { "$ref": "#/definitions/arrayItemsKeyValue" } } }, + { + "required": ["editor"], + "properties": { + "editor": { "enum": ["fileupload"] }, + "items": { "$ref": "#/definitions/arrayItemsFileupload" } + } + }, { "required": ["editor"], "properties": { @@ -1007,6 +1021,18 @@ }, "required": ["type"] }, + "arrayItemsFileupload": { + "title": "Utils: Array items fileupload definition", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { "enum": ["string"] }, + "pattern": { "type": "string" }, + "minLength": { "type": "integer" }, + "maxLength": { "type": "integer" } + }, + "required": ["type"] + }, "arrayItemsGlobs": { "title": "Utils: Array items globs definition", "type": "object", diff --git a/test/input_schema.test.ts b/test/input_schema.test.ts index cc71ca88..1ea2d3a0 100644 --- a/test/input_schema.test.ts +++ b/test/input_schema.test.ts @@ -39,6 +39,12 @@ describe('input_schema.json', () => { description: 'Some description ...', editor: 'fileupload', }, + myfield5: { + title: 'Array fileupload title', + type: 'array', + description: 'Some description...', + editor: 'fileupload', + }, }, };