Skip to content

Commit 314397b

Browse files
committed
Bug Fix: remove deprecated enums in type array
1 parent 20a7e8c commit 314397b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/lib/Property.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ const Property = class {
7373
if (schema.type === 'array') { // Handle arrays
7474
// Obtain list of permissible values, if it exists
7575
if (schema.hasOwnProperty('items')) {
76-
this._values = schema.items.enum;
76+
if (schema.deprecated_enum) {
77+
this._values = schema.items.enum.filter(value => !schema.deprecated_enum.includes(value));
78+
} else {
79+
this._values = schema.items.enum;
80+
}
7781
} else {
7882
this._values = [];
7983
}

0 commit comments

Comments
 (0)