pyramid_swagger
pyramid_swagger copied to clipboard
exclude_paths (lists) in ini file not correct parsed
All list definitions in ini file are not correctly parsed:
pyramid_swagger.exclude_paths = [r'^/static/?', r'^/api-docs/?', r'^/swagger.json']
ipdb> regexes
["[r'^/static/?', r'^/api-docs/?', r'^/swagger.json']"]
I got the same bug. When I set the code below, it will allow all the paths passed.
pyramid_swagger.exclude_paths = [r'^/login/?']
When I directly initialize this parameter in the main function, it works correctly.
def main(global_config, **settings):
settings['pyramid_swagger.exclude_paths'] = [r'^/login/?']
config = Configurator(settings=settings, root_factory=Root)
There is a bug with the parser of settings.
Hm. How do lists work in INI files? I was under the impression this worked, but now I'm having trouble finding any examples...
This should hopefully be fixed by #189.