From 71dca7a35fca8bb88166d21d09386a3cda021929 Mon Sep 17 00:00:00 2001 From: Richard Weyer Date: Mon, 25 May 2026 01:58:57 +0200 Subject: [PATCH] feat(gdd): add file list GDD types (Issue ebu#23) --- v1/specification/json-schemas/gdd/README.md | 37 ++++++++++ .../json-schemas/gdd/gdd-types.json | 67 +++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/v1/specification/json-schemas/gdd/README.md b/v1/specification/json-schemas/gdd/README.md index 2e3eb37..cc3e570 100644 --- a/v1/specification/json-schemas/gdd/README.md +++ b/v1/specification/json-schemas/gdd/README.md @@ -252,6 +252,43 @@ Lets the user pick an image file from disk Example data: `"C:\images\myImage.jpg"` or `"folder/myImage.png"` +### File list + +Lets the user select a file from a list of files scanned from a folder. + +```typescript +{ + "type": "string", + "gddType": "file-list", + "gddOptions": { + "folder": "files", // [Required, String] Folder path or URI to scan. Relative paths are resolved relative to the manifest/base folder. + "extensions": ["jpg", "txt"] // [Optional, Array of strings] Limit which files can be selected by the user. + } +} +``` + +Example data: `"files/myImage.jpg"` or `"files/myFile.txt"` + +### File list multiple + +Lets the user select multiple files from a list of files scanned from a folder. + +```typescript +{ + "type": "array", + "items": { + "type": "string" + }, + "gddType": "file-list-multiple", + "gddOptions": { + "folder": "files", // [Required, String] Folder path or URI to scan. Relative paths are resolved relative to the manifest/base folder. + "extensions": ["jpg", "txt"] // [Optional, Array of strings] Limit which files can be selected by the user. + } +} +``` + +Example data: `["files/myImage.jpg", "files/myFile.txt"]` + ### Select Lets the user select from a limited number of options (this is often done from a dropdown menu). diff --git a/v1/specification/json-schemas/gdd/gdd-types.json b/v1/specification/json-schemas/gdd/gdd-types.json index 311a76d..ff82867 100644 --- a/v1/specification/json-schemas/gdd/gdd-types.json +++ b/v1/specification/json-schemas/gdd/gdd-types.json @@ -77,6 +77,73 @@ } } }, + { + "if": { + "properties": { "gddType": { "const": "file-list" } }, + "required": ["gddType"] + }, + "then": { + "properties": { + "type": { + "const": "string" + }, + "gddOptions": { + "type": "object", + "properties": { + "folder": { + "type": "string" + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["folder"] + } + }, + "required": ["gddOptions"] + } + }, + { + "if": { + "properties": { "gddType": { "const": "file-list-multiple" } }, + "required": ["gddType"] + }, + "then": { + "properties": { + "type": { + "const": "array" + }, + "items": { + "type": "object", + "properties": { + "type": { + "const": "string" + } + }, + "required": ["type"] + }, + "gddOptions": { + "type": "object", + "properties": { + "folder": { + "type": "string" + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["folder"] + } + }, + "required": ["gddOptions", "items"] + } + }, { "if": { "properties": { "gddType": { "const": "select" } },