Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
),
},
"paths": self.config.get('paths') or defaultdict(dict),
"definitions": self.config.get('definitions') or defaultdict(dict)
}
openapi_version = self.config.get('openapi')
if openapi_version:
data["openapi"] = openapi_version
else:
data["swagger"] = self.config.get('swagger') or self.config.get(
'swagger_version', "2.0"
)
# Support extension properties in the top level config
top_level_extension_options = get_vendor_extension_fields(self.config)
if top_level_extension_options:
data.update(top_level_extension_options)
# if True schemaa ids will be prefized by function_method_{id}
# for backwards compatibility with <= 0.5.14
prefix_ids = self.config.get('prefix_ids')
if self.config.get('host'):
data['host'] = self.config.get('host')
if self.config.get("basePath"):
data["basePath"] = self.config.get('basePath')
if self.config.get('schemes'):
data['schemes'] = self.config.get('schemes')
if self.config.get("securityDefinitions"):
data["securityDefinitions"] = self.config.get(
'securityDefinitions'