|
98 | 98 | "title": { "type": "string" }, |
99 | 99 | "description": { "type": "string" }, |
100 | 100 | "nullable": { "type": "boolean" }, |
101 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden", "fileupload"] }, |
| 101 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "select", "fileupload", "hidden"] }, |
102 | 102 | "isSecret": { "type": "boolean" } |
103 | 103 | }, |
104 | 104 | "required": ["type", "title", "description", "editor"], |
105 | 105 | "if": { |
106 | 106 | "properties": { |
107 | | - "isSecret": { |
108 | | - "not": { |
109 | | - "const": true |
110 | | - } |
111 | | - } |
| 107 | + "isSecret": { "not": { "const": true } } |
112 | 108 | } |
113 | 109 | }, |
114 | 110 | "then": { |
|
142 | 138 | }, |
143 | 139 | "else": { |
144 | 140 | "properties": { |
145 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] } |
| 141 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "select", "fileupload", "hidden"] } |
146 | 142 | } |
147 | 143 | } |
148 | 144 | }, |
|
156 | 152 | "else": { |
157 | 153 | "properties": { "default": { "type": ["string", "null"] } } |
158 | 154 | } |
| 155 | + }, |
| 156 | + { |
| 157 | + "if": { |
| 158 | + "required": ["editor"], |
| 159 | + "properties": { |
| 160 | + "editor": { "const": "select" } |
| 161 | + } |
| 162 | + }, |
| 163 | + "then": { |
| 164 | + "properties": { |
| 165 | + "enumSuggestedValues": { |
| 166 | + "type": "array", |
| 167 | + "items": { "type": "string" }, |
| 168 | + "minItems": 1, |
| 169 | + "uniqueItems": true |
| 170 | + }, |
| 171 | + "enumTitles": { |
| 172 | + "type": "array", |
| 173 | + "items": { "type": "string" }, |
| 174 | + "minItems": 1 |
| 175 | + } |
| 176 | + }, |
| 177 | + "required": ["enumSuggestedValues"] |
| 178 | + } |
159 | 179 | } |
160 | 180 | ] |
161 | 181 | }, |
|
694 | 714 | "nullable": { "type": "boolean" }, |
695 | 715 | "minLength": { "type": "integer" }, |
696 | 716 | "maxLength": { "type": "integer" }, |
697 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden", "fileupload"] } |
| 717 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "select", "fileupload", "hidden"] } |
698 | 718 | }, |
699 | 719 | "required": ["type", "title", "description"], |
700 | 720 | "allOf": [ |
|
712 | 732 | }, |
713 | 733 | "else": { |
714 | 734 | "properties": { |
715 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] } |
| 735 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "select", "fileupload", "hidden"] } |
716 | 736 | } |
717 | 737 | } |
718 | 738 | }, |
|
726 | 746 | "else": { |
727 | 747 | "properties": { "default": { "type": ["string", "null"] } } |
728 | 748 | } |
| 749 | + }, |
| 750 | + { |
| 751 | + "if": { |
| 752 | + "required": ["editor"], |
| 753 | + "properties": { |
| 754 | + "editor": { "const": "select" } |
| 755 | + } |
| 756 | + }, |
| 757 | + "then": { |
| 758 | + "properties": { |
| 759 | + "enumSuggestedValues": { |
| 760 | + "type": "array", |
| 761 | + "items": { "type": "string" }, |
| 762 | + "minItems": 1, |
| 763 | + "uniqueItems": true |
| 764 | + }, |
| 765 | + "enumTitles": { |
| 766 | + "type": "array", |
| 767 | + "items": { "type": "string" }, |
| 768 | + "minItems": 1 |
| 769 | + } |
| 770 | + }, |
| 771 | + "required": ["enumSuggestedValues"] |
| 772 | + } |
729 | 773 | } |
730 | 774 | ] |
731 | 775 | }, |
|
1137 | 1181 | "enumTitles": { |
1138 | 1182 | "type": "array", |
1139 | 1183 | "items": { "type": "string" } |
| 1184 | + }, |
| 1185 | + "enumSuggestedValues": { |
| 1186 | + "type": "array", |
| 1187 | + "items": { "type": "string" }, |
| 1188 | + "minItems": 1, |
| 1189 | + "uniqueItems": true |
1140 | 1190 | } |
1141 | 1191 | }, |
1142 | | - "required": ["type", "enum"] |
| 1192 | + "oneOf": [ |
| 1193 | + { "required": ["type", "enum"] }, |
| 1194 | + { "required": ["type", "enumSuggestedValues"] } |
| 1195 | + ] |
1143 | 1196 | }, |
1144 | 1197 | "arrayItemsKeyValue": { |
1145 | 1198 | "title": "Utils: Array items keyValue definition", |
|
0 commit comments