-
Notifications
You must be signed in to change notification settings - Fork 17
/
uihints-v3-schema.json
820 lines (820 loc) · 25.7 KB
/
uihints-v3-schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
{
"$schema": "https://json-schema.org/draft-04/schema#",
"id": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#",
"description": "WDP UI Hints schema",
"title": "WDP UI Hints schema",
"type": "object",
"properties": {
"id": {
"description": "Operator identifier",
"type": "string"
},
"json_schema": {
"description": "Refers to the JSON schema used to validate documents of this type",
"enum": [
"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json"
]
},
"label": {
"description": "External name of operator",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"description": {
"description": "Description of operator",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"icon": {
"description": "URL to operation icon",
"type": "string"
},
"group_info": {
"type": "array",
"items": {
"$ref": "#/definitions/group_definition"
}
},
"editor_size": {
"description": "Editor size for node edits",
"enum": [
"small",
"medium",
"large"
]
},
"pixel_width": {
"description": "Gives more control of editor panel width. The panel is shown at min size if editor_size is small and max size if editor_size is medium. If min and max are the same no sizing button is displayed.",
"type": "object",
"properties": {
"min": {
"description": "Minimum size in pixels for the right side editor flyout",
"type": "number"
},
"max": {
"description": "Maximum size in pixels for the right side editor flyout",
"type": "number"
}
}
},
"parameter_info": {
"items": {
"$ref": "#/definitions/parameter_definition"
},
"type": "array"
},
"complex_type_info": {
"items": {
"$ref": "#/definitions/complex_type_definition"
},
"type": "array"
},
"ui_parameters": {
"description": "List of UI only parameters",
"type": "array",
"items": {
"$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/definitions/parameter_definition"
}
},
"action_info": {
"items": {
"$ref": "#/definitions/action_definition"
},
"type": "array"
},
"help": {
"description": "Help information",
"type": "object",
"properties": {
"data": {
"description": "Data passed in the helpClickHandler.",
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": true
}
},
"required": [
"id"
],
"definitions": {
"group_definition": {
"description": "Grouping for parameters and groups",
"type": "object",
"properties": {
"id": {
"description": "Identifier for this group",
"type": "string"
},
"type": {
"description": "The group type to be displayed",
"type": "string",
"enum": [
"controls",
"tabs",
"subTabs",
"panels",
"columnSelection",
"columnSelectionRecursive",
"panelSelector",
"customPanel",
"summaryPanel",
"actionPanel",
"textPanel",
"twistyPanel",
"tearsheetPanel",
"columnPanel"
]
},
"depends_on_ref": {
"description": "Parameter name this group depends upon. Valid for panelSelector groups only.",
"type": "string"
},
"insert_panels": {
"description": "Indicates whether panels, contained with a panelSelector, should be inserted between the radio buttons of a radio button set indicated by the depends_on_ref parameter.",
"type": "boolean"
},
"nested_panel": {
"description": "Indicate whether panel should be nested. Nested panels are indented by 16px from the left and display left border. Default is false.",
"type": "boolean"
},
"open": {
"description": "Used to determine if a panel is open or closed when UI is displayed. Currenty only supported with twistyPanel. Default is false.",
"type": "boolean"
},
"label": {
"description": "Group label",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"description": {
"description": "Group description. Used in a textPanel and tearsheetPanel",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"parameter_refs": {
"description": "List of parameters to be displayed",
"type": "array",
"items": {
"type": "string"
}
},
"action_refs": {
"description": "List of actions to be displayed. Used with an actionPanel",
"type": "array",
"items": {
"type": "string"
}
},
"data": {
"description": "Data passed to custom panel when group type is 'customPanel'",
"additionalProperties": true,
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"group_info": {
"items": {
"$ref": "#/definitions/group_definition"
},
"type": "array"
},
"class_name": {
"description": "Optional class name to set for this group",
"type": "string"
}
},
"required": [
"id"
]
},
"parameter_definition": {
"description": "Operator parameters hints",
"type": "object",
"properties": {
"parameter_ref": {
"description": "Parameter reference to base operator parameter definition",
"type": "string"
},
"label": {
"description": "External name for parameter",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"label_visible": {
"description": "Whether to display the label or not. If not displayed, the label can still be used by screen readers",
"type": "boolean",
"default": true
},
"description": {
"description": "Description of parameter with optional placement context and optional link",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/resource_definition"
},
{
"properties": {
"placement": {
"description": "Optional placement context for the text",
"enum": [
"as_tooltip",
"on_panel"
],
"default": "as_tooltip"
},
"link": {
"description": "Optional link in the description. tooltipLinkHandler callback must be defined whenever link object is added in uiHints.",
"type": "object",
"properties": {
"id": {
"description": "link id",
"type": "string"
},
"data": {
"description": "Data passed to the tooltipLinkHandler callback",
"type": "object",
"additionalProperties": true
}
},
"required": [
"id"
]
}
}
}
]
},
"control": {
"description": "Which control to use. In most cases the control gets to be determined and should not be set",
"type": "string",
"enum": [
"readonly",
"readonlyTable",
"textfield",
"passwordfield",
"textarea",
"expression",
"numberfield",
"spinner",
"checkbox",
"radioset",
"checkboxset",
"toggletext",
"toggle",
"oneofselect",
"multiselect",
"someofselect",
"selectcolumn",
"selectcolumns",
"selectschema",
"structuretable",
"structurelisteditor",
"structureeditor",
"custom",
"datefield",
"datepicker",
"datepickerRange",
"timefield",
"timestampfield",
"slider",
"code",
"list",
"hidden"
]
},
"increment": {
"description": "Determines the step value to increment/decrement for spinner and slider controls",
"type": "number",
"default": 1
},
"min_value": {
"description": "Determines the minimum value for the slider control only",
"type": "number",
"default": 1
},
"max_value": {
"description": "Determines the max value for the slider control only",
"type": "number",
"default": 1
},
"orientation": {
"description": "Determines how the control is displayed",
"type": "string",
"enum": [
"vertical",
"horizontal"
]
},
"width": {
"description": "Percentage of group width the control should use",
"type": "number"
},
"char_limit": {
"description": "Limits the number of characters a user can enter into the control for string parameters only",
"type": "number"
},
"display_chars": {
"description": "This has been deprecated and is subject to removal. Limits the number of characters displayed for a text field in a column in a table. The text will have an ellipsis appended at this limit.",
"type": "number",
"default": 64
},
"separator": {
"description": "Determines where to put a separator relative to the current control",
"type": "string",
"enum": [
"before",
"after"
]
},
"visible": {
"description": "Determines whether to display parameter in control. Used in complex structures",
"type": "boolean"
},
"place_holder_text": {
"description": "Text hint for the user displayed input controls",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"helper_text": {
"description": "Additional text to be displayed below the control",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"text_before": {
"description": "Static text to be displayed before the control",
"type": "object",
"$ref": "#/definitions/text_definition"
},
"text_after": {
"description": "Static text to be displayed after the control",
"type": "object",
"$ref": "#/definitions/text_definition"
},
"resource_key": {
"description": "Used as a key for enum value labels",
"type": "string"
},
"edit_style": {
"description": "Editing style of elements in a table",
"type": "string",
"enum": [
"subpanel",
"inline",
"on_panel"
]
},
"value_icons": {
"description": "For enumerated types, this defines the set of icons for the valid values. The ordering must be consistent with the order in the parameter enum attribute.",
"type": "array",
"items": {
"type": "string"
}
},
"sortable": {
"description": "Determines if this column values can be sorted into ascending/descending order in a table. Applies to structure parameters only.",
"type": "boolean"
},
"filterable": {
"description": "Determines if this column values can be filtered so that only rows that match the filter in column values are shown in the table. Applies to structure parameters and multiselect control only.",
"type": "boolean"
},
"resizable": {
"description": "Determines if this column can be resized in a table. When a column is resized, width of all the columns to the right of resized column is adjusted. Applies to structure parameters only.",
"type": "boolean",
"default": false
},
"language": {
"description": "The language for the expression editor syntax highlight and autocomplete workds. Applies to expression control type.",
"type": "string",
"enum": [
"CLEM",
"javascript",
"text/x-hive",
"text/x-rsrc",
"text/x-python",
"text/x-sql"
]
},
"summary": {
"description": "Determines if this column values will be shown in the summaryPanel",
"type": "boolean"
},
"generated_values": {
"description": "Generates values for a column in a 'readonly' parameter.",
"type": "object",
"properties": {
"operation": {
"description": "Currently only 'index' is supported which will auto-increment the integer column value starting at 1. The start value can be configured by setting a start_value.",
"type": "string",
"enum": [
"index"
]
},
"start_value": {
"description": "Optional start value to increment from when the 'type' is 'index'. If the start_value is not set, it will default to 1.",
"type": "integer"
}
},
"required": [
"operation"
]
},
"number_generator": {
"description": "Adds a number generation button beside the numeric control",
"type": "object",
"properties": {
"label": {
"description": "Number generator button label. It is visible on hover.",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"range": {
"description": "Number generator range",
"type": "object",
"properties": {
"min": {
"description": "Maximum value for generated numbers",
"type": "number"
}
},
"required": [
"min",
"max"
]
}
},
"required": [
"label"
]
},
"dm_default": {
"description": "Used within complex structures containing 'column' key_definition fields. This associates the subControl parameter with a field attribute in the current record schema.",
"type": "string",
"enum": [
"type",
"description",
"measure",
"modeling_role"
]
},
"dm_icon": {
"description": "This can be set to display an icon of the corresponding dm type in the `role`:`column' field of a table.",
"type": "string",
"enum": [
"measure",
"none"
]
},
"custom_control_id": {
"description": "Used to determine which custom control to use when control=custom.",
"type": "string"
},
"data": {
"description": "Data passed to custom control when control=custom",
"type": "object",
"additionalProperties": true
},
"date_format": {
"description": "A format string such as YYYY-MM-DD which describes the display and entry format for a date field.",
"type": "string"
},
"time_format": {
"description": "A format string such as HH:mm:ss which describes the display and entry format for a time field.",
"type": "string"
},
"moveable_rows": {
"description": "Determines if rows can be moved up or down in a table or array of strings",
"type": "boolean"
},
"rows": {
"description": "Number of rows to display in tables",
"type": "integer",
"default": 4
},
"action_ref": {
"description": "Determines an action should be added to the control",
"type": "string"
},
"custom_value_allowed": {
"description": "Determines if a dropdown, outside of a table, can allow a custom value to be entered",
"type": "boolean"
},
"class_name": {
"description": "Optional class name to set for this control",
"type": "string"
},
"enable_maximize": {
"description": "Determines if maximize/minimze buttons are shown for code control",
"type": "boolean"
}
},
"required": [
"parameter_ref"
]
},
"complex_type_definition": {
"type": "object",
"description": "Complex parameters",
"properties": {
"complex_type_ref": {
"type": "string",
"description": "Name of complex type, can be referenced in other places."
},
"label": {
"description": "External name used in subpanels",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"key_definition": {
"$ref": "#/definitions/parameter_definition"
},
"layout": {
"description": "Array of rows containing structure element names",
"type": "array",
"items": {
"description": "A single row of structure parameter names for laying out horizontally",
"type": "array",
"items": {
"description": "A parameter name within the current structure",
"type": "string"
}
}
},
"parameters": {
"type": "array",
"description": "List of parameters",
"items": {
"anyOf": [
{
"$ref": "#/definitions/parameter_definition"
},
{
"$ref": "#/definitions/complex_type_definition"
}
]
}
},
"add_remove_rows": {
"description": "Determines if the table can have rows added and removed",
"type": "boolean",
"default": true
},
"row_selection": {
"description": "Determines how many rows can be selected at a time. 'multiple-edit': select multiple rows and allow the editing of column values for all selected rows.",
"type": "string",
"enum": [
"single",
"multiple",
"multiple-edit"
]
},
"header": {
"description": "Determines if the table header should be displayed",
"type": "boolean",
"default": true
},
"include_all_fields": {
"description": "Use when `add_remove_rows` is false. Ensures the control contains a record for each field in the data model.",
"type": "boolean",
"default": true
},
"buttons": {
"description": "Display custom buttons in place of any buttons from the table. Will override 'add_remove_rows' and readonlyTable edit buttons.",
"type": "array",
"items": {
"$ref": "#/definitions/button_definition"
}
}
},
"required": [
"complex_type_ref",
"parameters"
]
},
"action_definition": {
"description": "Actions that callback to application",
"type": "object",
"properties": {
"id": {
"description": "Identifier for this action",
"type": "string"
},
"description": {
"description": "Description of action. Use for tooltip.",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"control": {
"description": "The action type to be displayed",
"type": "string",
"enum": [
"button",
"image"
]
},
"class_name": {
"description": "Optional class name to set for this action",
"type": "string"
},
"label": {
"description": "Action label",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"button": {
"description": "Properties for button kind and size. Use when control=button.",
"type": "object",
"properties": {
"kind": {
"description": "button kind",
"type": "string",
"enum": [
"primary",
"secondary",
"tertiary",
"ghost",
"danger",
"danger--tertiary",
"danger--ghost"
],
"default": "tertiary"
},
"size": {
"description": "button size",
"enum": [
"sm",
"md",
"lg",
"xl"
],
"default": "sm"
}
}
},
"image": {
"description": "Properties for how the image will look. Use when control=image.",
"type": "object",
"properties": {
"url": {
"description": "image url to be used for action",
"type": "string"
},
"placement": {
"description": "placement of the action image",
"enum": [
"right",
"left"
]
},
"size": {
"description": "pixel size of the image.",
"type": "object",
"properties": {
"height": {
"description": "image height in pixels",
"type": "number"
},
"width": {
"description": "image width in pixels",
"type": "number"
}
}
},
"tooltip_direction": {
"description": "Action image tooltip direction.",
"enum": [
"right",
"left",
"top",
"bottom"
],
"default": "bottom"
}
}
},
"data": {
"description": "Data returned when action called",
"type": "object",
"additionalProperties": true
}
},
"required": [
"id"
]
},
"resource_definition": {
"description": "Localizable string resource",
"type": "object",
"properties": {
"default": {
"type": "string"
},
"resource_key": {
"type": "string"
}
},
"anyOf": [
{
"required": [
"default"
]
},
{
"required": [
"resource_key"
]
}
]
},
"text_definition": {
"description": "Static text to be displayed before or after the control",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/resource_definition"
},
{
"properties": {
"type": {
"description": "Type of text message to display",
"enum": [
"info"
]
}
}
}
]
},
"button_definition": {
"description": "Button to be displayed after the table's search bar",
"type": "object",
"properties": {
"id": {
"description": "Button identifier used to idenify the button in the callback function",
"type": "string"
},
"label": {
"description": "Button label to display. If an icon is specified as well, the icon will be shown to the right of the label.",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"description": {
"description": "Tooltip text to display when the button is hovered",
"type": "object",
"$ref": "#/definitions/resource_definition"
},
"icon": {
"description": "URL to .svg image to display",
"type": "string"
},
"carbon_icon": {
"description": "Host provided name of Carbon icon to display. A callback function is required for the host application to return the jsx icon object imported from @carbon/icons-react library",
"type": "string"
},
"enabled": {
"description": "Button will be enabled if true, disabled if false",
"type": "boolean",
"default": false
},
"divider": {
"description": "Display a divider before or after this button",
"type": "string",
"enum": [
"before",
"after"
],
"default": "after"
}
},
"anyOf": [
{
"required": [
"id",
"label"
]
},
{
"required": [
"id",
"icon",
"description"
]
},
{
"required": [
"id",
"carbon_icon",
"description"
]
}
]
}
}
}