Skip to content

Commit c469322

Browse files
committed
Fix #76: Don't modify display text for additional properties
1 parent 2fc8af1 commit c469322

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/ui.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ export function getObjectFormRow(args) {
378378
let value = data[key];
379379
let childName = joinCoords(name, key);
380380
let schemaValue = schema_keys.hasOwnProperty(key) ? {...schema_keys[key]} : undefined;
381+
let isAdditionalProperty = schema_keys.hasOwnProperty(key) ? false : true;
381382

382383
if (typeof schemaValue === 'undefined') {
383384
// for keys added through additionalProperties
@@ -394,8 +395,12 @@ export function getObjectFormRow(args) {
394395

395396
let type = normalizeKeyword(schemaValue.type);
396397

397-
if (!schemaValue.title || (isRef && schema.additionalProperties)) // for additionalProperty refs, use the key as the title
398-
schemaValue.title = getVerboseName(key);
398+
if (!schemaValue.title) {
399+
if (isAdditionalProperty)
400+
schemaValue.title = key;
401+
else
402+
schemaValue.title = getVerboseName(key);
403+
}
399404

400405
let removable = false;
401406
if (schema_keys[key] === undefined)

0 commit comments

Comments
 (0)