diff --git a/lib/specResolver.js b/lib/specResolver.js index aea862d2..37177ecc 100644 --- a/lib/specResolver.js +++ b/lib/specResolver.js @@ -329,7 +329,7 @@ class SpecResolver { modelNames.forEach(function iterator(modelName) { let model = definitions[modelName]; if (model) { - if (!model.additionalProperties || force) { + if (force || (!model.additionalProperties && (!(!model.properties || (model.properties && Object.keys(model.properties).length === 0))))) { model.additionalProperties = false; } }