From 50ebd50f30a651b047e09acb04208f7fa65673ce Mon Sep 17 00:00:00 2001 From: Vitalii Yarmus Date: Mon, 1 Sep 2025 14:31:33 +0300 Subject: [PATCH 1/3] HCK-12560: enabled on references --- .../field_level/fieldLevelConfig.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index f04ead2..a3ee1a9 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -231,6 +231,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -607,6 +608,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -935,6 +937,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -1263,6 +1266,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -1470,6 +1474,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -1631,6 +1636,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -1934,6 +1940,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2375,6 +2382,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2443,6 +2451,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2522,6 +2531,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2666,6 +2676,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2737,6 +2748,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2795,6 +2807,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2876,6 +2889,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -3337,6 +3351,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -3405,6 +3420,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -3568,6 +3584,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -3679,6 +3696,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -3761,6 +3779,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -3843,6 +3862,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -3925,6 +3945,7 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", + "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ From 0bec1e02e5a2988afa83f834482bf90c50e08159 Mon Sep 17 00:00:00 2001 From: Vitalii Yarmus Date: Mon, 1 Sep 2025 16:32:28 +0300 Subject: [PATCH 2/3] HCK-12560: Disable for model references because OpenAPI does not support it --- .../field_level/fieldLevelConfig.json | 1195 ++++++++++++++++- 1 file changed, 1147 insertions(+), 48 deletions(-) diff --git a/properties_pane/field_level/fieldLevelConfig.json b/properties_pane/field_level/fieldLevelConfig.json index a3ee1a9..46c1d45 100644 --- a/properties_pane/field_level/fieldLevelConfig.json +++ b/properties_pane/field_level/fieldLevelConfig.json @@ -227,6 +227,44 @@ making sure that you maintain a proper JSON format. "fieldKeyword": "comments", "hidden": true }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -251,7 +289,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -604,6 +655,44 @@ making sure that you maintain a proper JSON format. "enableForReference": true }, "comments", + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -628,7 +717,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } } ], "number": [ @@ -933,6 +1035,44 @@ making sure that you maintain a proper JSON format. "enableForReference": true }, "comments", + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -957,7 +1097,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } } ], "integer": [ @@ -1262,6 +1415,44 @@ making sure that you maintain a proper JSON format. "enableForReference": true }, "comments", + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -1286,7 +1477,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } } ], "boolean": [ @@ -1470,6 +1674,44 @@ making sure that you maintain a proper JSON format. "enableForReference": true }, "comments", + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -1494,7 +1736,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } } ], "null": [ @@ -1636,7 +1891,6 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", - "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -1656,26 +1910,78 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] - } - ], - "array": [ - { - "fieldName": "Name", - "fieldKeyword": "name", - "fieldType": "coupled", - "disabledOnCondition": [ - { - "key": "subtype", - "value": "anyParameter" - } - ] + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { - "fieldName": "Technical name", - "fieldKeyword": "code", - "fieldType": "coupled", - "disabledOnCondition": [ + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "enableForReference": true, + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + } + ], + "array": [ + { + "fieldName": "Name", + "fieldKeyword": "name", + "fieldType": "coupled", + "disabledOnCondition": [ + { + "key": "subtype", + "value": "anyParameter" + } + ] + }, + { + "fieldName": "Technical name", + "fieldKeyword": "code", + "fieldType": "coupled", + "disabledOnCondition": [ { "key": "subtype", "value": "anyParameter" @@ -1936,6 +2242,53 @@ making sure that you maintain a proper JSON format. "propertyKeyword": "subtype", "hidden": true }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "and", + "values": [ + { + "key": "subtype", + "value": "schema" + }, + { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -1962,8 +2315,26 @@ making sure that you maintain a proper JSON format. } ], "dependency": { - "key": "subtype", - "value": "schema" + "type": "and", + "values": [ + { + "key": "subtype", + "value": "schema" + }, + { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + ] } } ], @@ -2378,6 +2749,53 @@ making sure that you maintain a proper JSON format. ] } }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "and", + "values": [ + { + "key": "subtype", + "value": "schema" + }, + { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -2404,8 +2822,26 @@ making sure that you maintain a proper JSON format. } ], "dependency": { - "key": "subtype", - "value": "schema" + "type": "and", + "values": [ + { + "key": "subtype", + "value": "schema" + }, + { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + ] } }, "comments", @@ -2447,6 +2883,44 @@ making sure that you maintain a proper JSON format. "fieldType": "details", "template": "textarea" }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -2471,7 +2945,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -2527,6 +3014,44 @@ making sure that you maintain a proper JSON format. "fieldType": "details", "template": "textarea" }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -2551,7 +3076,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -2676,7 +3214,6 @@ making sure that you maintain a proper JSON format. "propertyName": "extensions", "propertyType": "group", "propertyKeyword": "scopesExtensions", - "enableForReference": true, "shouldValidate": true, "propertyTooltip": "", "structure": [ @@ -2696,13 +3233,65 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] - }, - { - "propertyKeyword": "subtype", - "hidden": true - } - ], + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "enableForReference": true, + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, + { + "propertyKeyword": "subtype", + "hidden": true + } + ], "encoding": [ { "fieldName": "Name", @@ -2744,6 +3333,44 @@ making sure that you maintain a proper JSON format. "fieldKeyword": "allowReserved", "fieldType": "checkbox" }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -2768,7 +3395,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -2803,6 +3443,44 @@ making sure that you maintain a proper JSON format. "fieldKeyword": "externalValue", "fieldType": "text" }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -2827,7 +3505,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -2885,6 +3576,44 @@ making sure that you maintain a proper JSON format. "markdown": false, "shouldValidate": true }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -2909,7 +3638,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -3347,6 +4089,44 @@ making sure that you maintain a proper JSON format. "value": "openIdConnect" } }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -3371,7 +4151,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -3416,6 +4209,44 @@ making sure that you maintain a proper JSON format. "enableForReference": true }, "comments", + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -3440,7 +4271,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } } ], "link": [ @@ -3580,6 +4424,44 @@ making sure that you maintain a proper JSON format. } ] }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -3604,7 +4486,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } } ], "expression": [ @@ -3692,6 +4587,44 @@ making sure that you maintain a proper JSON format. "propertyType": "text", "shouldValidate": true }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -3716,7 +4649,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -3775,6 +4721,44 @@ making sure that you maintain a proper JSON format. "propertyType": "text", "shouldValidate": true }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -3799,7 +4783,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -3858,6 +4855,44 @@ making sure that you maintain a proper JSON format. "propertyType": "text", "shouldValidate": true }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -3882,7 +4917,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", @@ -3941,6 +4989,44 @@ making sure that you maintain a proper JSON format. "propertyType": "text", "shouldValidate": true }, + { + "propertyName": "extensions", + "propertyType": "group", + "propertyKeyword": "scopesExtensions", + "shouldValidate": true, + "propertyTooltip": "", + "structure": [ + { + "propertyName": "pattern", + "propertyKeyword": "extensionPattern", + "shouldValidate": true, + "propertyType": "text", + "regex": "^x-" + }, + { + "propertyName": "value", + "propertyKeyword": "extensionValue", + "propertyValidate": false, + "propertyTooltip": "Popup for multi-line text entry", + "propertyType": "details", + "template": "textarea", + "markdown": false + } + ], + "dependency": { + "type": "not", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } + }, { "propertyName": "extensions", "propertyType": "group", @@ -3965,7 +5051,20 @@ making sure that you maintain a proper JSON format. "template": "textarea", "markdown": false } - ] + ], + "dependency": { + "type": "or", + "values": [ + { + "key": "refType", + "value": "polyglot" + }, + { + "key": "refType", + "value": "external" + } + ] + } }, { "propertyKeyword": "subtype", From a1857dc62f98bd55a2bad4503bfcd6ce5a914d93 Mon Sep 17 00:00:00 2001 From: Vitalii Yarmus Date: Tue, 2 Sep 2025 10:35:03 +0300 Subject: [PATCH 3/3] Do not add empty array of scopesExtensions --- reverse_engineering/helpers/dataHelper.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/reverse_engineering/helpers/dataHelper.js b/reverse_engineering/helpers/dataHelper.js index 6c4730c..619bb46 100644 --- a/reverse_engineering/helpers/dataHelper.js +++ b/reverse_engineering/helpers/dataHelper.js @@ -26,6 +26,10 @@ const getExtensions = schema => { const getExtensionsObject = (data, keyword = 'scopesExtensions') => { const extensions = getExtensions(data); + if (extensions.length === 0) { + return {}; + } + return { [keyword]: extensions }; }; @@ -73,13 +77,14 @@ const getServersData = servers => { } const variables = server.variables ? getServersVariables(server.variables) : []; + const extensions = getExtensions(server); return [ ...accum, { serverURL: server.url, serverDescription: server.description, serverVariables: variables, - scopesExtensions: getExtensions(server), + ...(extensions.length > 0 && { scopesExtensions: extensions }), }, ]; }, []); @@ -88,12 +93,13 @@ const getServersData = servers => { const getServersVariables = variables => { return Object.keys(variables).map(variable => { const variableData = variables[variable]; + const extensions = getExtensions(variables); return { serverVariableName: variable, serverVariableEnum: (variableData.enum || []).map(enumVal => ({ serverVariableEnumValue: enumVal })), serverVariableDefault: variableData.default, serverVariableDescription: variableData.description, - scopesExtensions: getExtensions(variables), + ...(extensions.length > 0 && { scopesExtensions: extensions }), }; }, []); }; @@ -624,7 +630,7 @@ const handleSchemaExtensions = schema => { const mappedExtensionsObject = getExtensionsObject(schema); if ( !Array.isArray(mappedExtensionsObject.scopesExtensions) || - mappedExtensionsObject.scopesExtensions.length === 0 + mappedExtensionsObject.scopesExtensions?.length === 0 ) { return schema; }