Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions v1/specification/json-schemas/gdd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
67 changes: 67 additions & 0 deletions v1/specification/json-schemas/gdd/gdd-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" } },
Expand Down