Skip to content

Commit eedc914

Browse files
authored
HCK-11878: FE additional properties only when its false (#86)
* HCK-11878: FE additionalProperties only when false or undefined * HCK-11878: fixed condition * HCK-11878: make condition more robust * HCK-11878: make condition more explicit
1 parent be3fd8e commit eedc914

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

forward_engineering/helpers/typeHelper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ function getAdditionalProperties(data) {
248248
}
249249

250250
if (data.additionalPropControl === 'Boolean') {
251-
return data.additionalProperties || undefined;
251+
/**
252+
* additionalProperties property should be omitted when the value is equal to "true" because it is enabled by default.
253+
* In case the property is missing or false it is explicitly included with "false" value
254+
*/
255+
return data.additionalProperties ? undefined : false;
252256
}
253257

254258
return getAdditionalPropsObject(data);

0 commit comments

Comments
 (0)