Closed cuonglm closed 6 years ago
Override schemes in SWAGGER_INFO does not work, because the schemes() function is checking it wrongly:
schemes
SWAGGER_INFO
schemes()
def schemes(): cfg = app.config[eve_swagger.INFO] if hasattr(cfg, 'schemes'): return cfg['schemes'] scheme = request.url.split(':')[0] return [scheme] if scheme in ['http', 'https', 'ws', 'wss'] else None
cfg is a dict, it has no attribute schemes.
cfg
dict
This PR fixes the issue by checking the schemes key actually exists.
cc @nicolaiarocci
Thanks for this and sorry it took so long to get back to you!
Override
schemes
inSWAGGER_INFO
does not work, because theschemes()
function is checking it wrongly:cfg
is adict
, it has no attributeschemes
.This PR fixes the issue by checking the
schemes
key actually exists.