pyramid_swagger icon indicating copy to clipboard operation
pyramid_swagger copied to clipboard

exclude_paths (lists) in ini file not correct parsed

Open delijati opened this issue 9 years ago • 3 comments

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']"]

delijati avatar Aug 07 '15 12:08 delijati

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.

JinpengLI avatar Apr 14 '16 15:04 JinpengLI

Hm. How do lists work in INI files? I was under the impression this worked, but now I'm having trouble finding any examples...

striglia avatar Apr 14 '16 23:04 striglia

This should hopefully be fixed by #189.

sjaensch avatar Mar 10 '17 09:03 sjaensch