|
99 | 99 | "title": { "type": "string" }, |
100 | 100 | "description": { "type": "string" }, |
101 | 101 | "nullable": { "type": "boolean" }, |
102 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden", "fileupload"] }, |
| 102 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "select", "fileupload", "hidden"] }, |
103 | 103 | "isSecret": { "type": "boolean" } |
104 | 104 | }, |
105 | 105 | "required": ["type", "title", "description", "editor"], |
106 | 106 | "if": { |
107 | 107 | "properties": { |
108 | | - "isSecret": { |
109 | | - "not": { |
110 | | - "const": true |
111 | | - } |
112 | | - } |
| 108 | + "isSecret": { "not": { "const": true } } |
113 | 109 | } |
114 | 110 | }, |
115 | 111 | "then": { |
|
144 | 140 | }, |
145 | 141 | "else": { |
146 | 142 | "properties": { |
147 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] } |
| 143 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "select", "fileupload", "hidden"] } |
148 | 144 | } |
149 | 145 | } |
150 | 146 | }, |
|
158 | 154 | "else": { |
159 | 155 | "properties": { "default": { "type": ["string", "null"] } } |
160 | 156 | } |
| 157 | + }, |
| 158 | + { |
| 159 | + "if": { |
| 160 | + "required": ["editor"], |
| 161 | + "properties": { |
| 162 | + "editor": { "const": "select" } |
| 163 | + } |
| 164 | + }, |
| 165 | + "then": { |
| 166 | + "properties": { |
| 167 | + "enumSuggestedValues": { |
| 168 | + "type": "array", |
| 169 | + "items": { "type": "string" }, |
| 170 | + "minItems": 1, |
| 171 | + "uniqueItems": true |
| 172 | + }, |
| 173 | + "enumTitles": { |
| 174 | + "type": "array", |
| 175 | + "items": { "type": "string" }, |
| 176 | + "minItems": 1 |
| 177 | + } |
| 178 | + }, |
| 179 | + "required": ["enumSuggestedValues"] |
| 180 | + } |
161 | 181 | } |
162 | 182 | ] |
163 | 183 | }, |
|
708 | 728 | "nullable": { "type": "boolean" }, |
709 | 729 | "minLength": { "type": "integer" }, |
710 | 730 | "maxLength": { "type": "integer" }, |
711 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden", "fileupload"] }, |
| 731 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "select", "fileupload", "hidden"] }, |
712 | 732 | "errorMessage": { "$ref": "#/definitions/errorMessage" } |
713 | 733 | }, |
714 | 734 | "required": ["type", "title", "description"], |
|
727 | 747 | }, |
728 | 748 | "else": { |
729 | 749 | "properties": { |
730 | | - "editor": { "enum": ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] } |
| 750 | + "editor": { "enum": ["javascript", "python", "textfield", "textarea", "select", "fileupload", "hidden"] } |
731 | 751 | } |
732 | 752 | } |
733 | 753 | }, |
|
741 | 761 | "else": { |
742 | 762 | "properties": { "default": { "type": ["string", "null"] } } |
743 | 763 | } |
| 764 | + }, |
| 765 | + { |
| 766 | + "if": { |
| 767 | + "required": ["editor"], |
| 768 | + "properties": { |
| 769 | + "editor": { "const": "select" } |
| 770 | + } |
| 771 | + }, |
| 772 | + "then": { |
| 773 | + "properties": { |
| 774 | + "enumSuggestedValues": { |
| 775 | + "type": "array", |
| 776 | + "items": { "type": "string" }, |
| 777 | + "minItems": 1, |
| 778 | + "uniqueItems": true |
| 779 | + }, |
| 780 | + "enumTitles": { |
| 781 | + "type": "array", |
| 782 | + "items": { "type": "string" }, |
| 783 | + "minItems": 1 |
| 784 | + } |
| 785 | + }, |
| 786 | + "required": ["enumSuggestedValues"] |
| 787 | + } |
744 | 788 | } |
745 | 789 | ] |
746 | 790 | }, |
|
1159 | 1203 | "enumTitles": { |
1160 | 1204 | "type": "array", |
1161 | 1205 | "items": { "type": "string" } |
| 1206 | + }, |
| 1207 | + "enumSuggestedValues": { |
| 1208 | + "type": "array", |
| 1209 | + "items": { "type": "string" }, |
| 1210 | + "minItems": 1, |
| 1211 | + "uniqueItems": true |
1162 | 1212 | } |
1163 | 1213 | }, |
1164 | | - "required": ["type", "enum"] |
| 1214 | + "oneOf": [ |
| 1215 | + { "required": ["type", "enum"] }, |
| 1216 | + { "required": ["type", "enumSuggestedValues"] } |
| 1217 | + ] |
1165 | 1218 | }, |
1166 | 1219 | "arrayItemsKeyValue": { |
1167 | 1220 | "title": "Utils: Array items keyValue definition", |
|
0 commit comments