code: function cleanUselessProperties(inputSpec) {
    const improvedSpec = JSON.parse(JSON.stringify(inputSpec));
    const toClean = [
      'definitions',
      'responses',
      'parameters',
      'securityDefinitions',
    ];
  
    toClean.forEach(unnecessaryProp => {
      if (hasEmptyProperty(improvedSpec[unnecessaryProp])) {
        delete improvedSpec[unnecessaryProp];
      }
    });
  
    return improvedSpec;
  }
docs: OpenAPI specification validator does not accept empty values for a few properties.
  Solves validator error: "Schema error should NOT have additional properties"
  @function
  @param {object} inputSpec - The swagger/openapi specification
  @param {object} improvedSpec - The cleaned version of the inputSpec