| 1 | { |
| 2 | "version": "1.0", |
| 3 | "parameters": { |
| 4 | "stringArrayParam": { |
| 5 | "type": "stringArray", |
| 6 | "required": true, |
| 7 | "default": ["defaultValue1", "defaultValue2"], |
| 8 | "documentation": "docs" |
| 9 | } |
| 10 | }, |
| 11 | "rules": [ |
| 12 | { |
| 13 | "documentation": "Template first array value into URI if set", |
| 14 | "conditions": [ |
| 15 | { |
| 16 | "fn": "getAttr", |
| 17 | "argv": [ |
| 18 | { |
| 19 | "ref": "stringArrayParam" |
| 20 | }, |
| 21 | "[0]" |
| 22 | ], |
| 23 | "assign": "arrayValue" |
| 24 | } |
| 25 | ], |
| 26 | "endpoint": { |
| 27 | "url": "https://example.com/{arrayValue}" |
| 28 | }, |
| 29 | "type": "endpoint" |
| 30 | }, |
| 31 | { |
| 32 | "conditions": [], |
| 33 | "documentation": "error fallthrough", |
| 34 | "error": "no array values set", |
| 35 | "type": "error" |
| 36 | } |
| 37 | ] |
| 38 | } |