Merge pull request #69 from amarzavery/sway4
additionalProperties not set to false if the object has empty properties or does not have properties
This commit is contained in:
Коммит
a3eb7a8a3e
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче