additionalProperties not set to false if the object has empty properties or does not have properties
This commit is contained in:
Родитель
dd00a71218
Коммит
7ce9eff171
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче