Skip to content

Commit 8bbd4c9

Browse files
Merge pull request #63 from taras-dubyk/master
HCK-3947 Fix extensions RE for top-level schema components
2 parents 978f752 + 42a3650 commit 8bbd4c9

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

properties_pane/field_level/fieldLevelConfig.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,35 @@ making sure that you maintain a proper JSON format.
18041804
{
18051805
"propertyKeyword": "subtype",
18061806
"hidden": true
1807+
},
1808+
{
1809+
"propertyName": "extensions",
1810+
"propertyType": "group",
1811+
"propertyKeyword": "scopesExtensions",
1812+
"shouldValidate": true,
1813+
"propertyTooltip": "",
1814+
"structure": [
1815+
{
1816+
"propertyName": "pattern",
1817+
"propertyKeyword": "extensionPattern",
1818+
"shouldValidate": true,
1819+
"propertyType": "text",
1820+
"regex":"^x-"
1821+
},
1822+
{
1823+
"propertyName": "value",
1824+
"propertyKeyword": "extensionValue",
1825+
"propertyValidate": false,
1826+
"propertyTooltip": "Popup for multi-line text entry",
1827+
"propertyType": "details",
1828+
"template": "textarea",
1829+
"markdown": false
1830+
}
1831+
],
1832+
"dependency": {
1833+
"key": "subtype",
1834+
"value": "schema"
1835+
}
18071836
}
18081837
],
18091838
"object": [

reverse_engineering/helpers/dataHelper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,8 @@ const handleDefinitionSchemaProps = (schema, fieldOrder) => {
641641

642642
const fixedSchema = convertFormatToMode(setMissedType(schema));
643643
const schemaWithAdditionalPropertiesData = handleAdditionalProperties(fixedSchema);
644-
const reorderedSchema = commonHelper.reorderFields(schemaWithAdditionalPropertiesData, fieldOrder);
644+
const schemaWithExtensions = handleSchemaExtensions(schemaWithAdditionalPropertiesData);
645+
const reorderedSchema = commonHelper.reorderFields(schemaWithExtensions, fieldOrder);
645646
const schemaWithHandledProperties = Object.keys(reorderedSchema).reduce((accumulator, property) => {
646647
if (property === 'example') {
647648
property = 'sample';

0 commit comments

Comments
 (0)