Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load(self):
http_client = FidoClientGlobalHeaders(headers=self.headers)
loader = Loader(http_client)
protocol = "https" if self.apikey else "http"
origin_url = f"{protocol}://{self.host}/apispec.json"
spec_dict = loader.load_spec(origin_url)
spec_dict["host"] = self.host
spec_dict["schemes"] = [protocol]
config = {
"validate_responses": False,
"use_models": False,
"include_missing_properties": False,
"formats": [email_format, url_format],
}
bravado_config = bravado_config_from_config_dict(config)
for key in set(bravado_config._fields).intersection(set(config)):
del config[key]