You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use apispec icw the 'apispec.ext.tornado' and 'apispec.ext.marshmallow' plugins.
Only i'm getting the following error:
Traceback (most recent call last):
File "D:\JetBrains\PyCharm 2017.2.4\helpers\pydev\pydevd.py", line 1599, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\JetBrains\PyCharm 2017.2.4\helpers\pydev\pydevd.py", line 1026, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\myproj/start.py", line 7, in <module>
main()
File "D:\myproj\medusa\__main__.py", line 2104, in main
application.start(sys.argv[1:])
File "D:\myproj\medusa\__main__.py", line 347, in start
self.web_server = AppWebServer(self.web_options)
File "D:\myproj\medusa\server\core.py", line 230, in __init__
spec.add_path(urlspec=urlspec)
File "D:\Python27\lib\site-packages\apispec\core.py", line 211, in add_path
raise APISpecError('Path template is not specified')
apispec.exceptions.APISpecError: Path template is not specified
And my route looks like this: '/api/v2/series/(?P<series_slug>\\w+)/episode(?:(?:(?:(?:/(?P<episode_slug>[\\w-]+))|/?)(?:(?:/(?P<path_param>\\w+))|/?))|/?)/?$'
So because the tornado plugin uses the matcher._path, it's can't translate to an OpenApi compliant path.
Is there anything I can do about it?
The text was updated successfully, but these errors were encountered:
Issue by p0psicles
Monday Dec 11, 2017 at 19:41 GMT
Originally opened as marshmallow-code/apispec#176
I'm trying to use apispec icw the 'apispec.ext.tornado' and 'apispec.ext.marshmallow' plugins.
Only i'm getting the following error:
It seems to be happening because matcher._path is None.
https://github.com/marshmallow-code/apispec/blob/dev/apispec/ext/tornado.py#L95
urlspec.matcher._path
returns None, because of this:https://github.com/tornadoweb/tornado/blob/master/tornado/routing.py#L571
And my route looks like this:
'/api/v2/series/(?P<series_slug>\\w+)/episode(?:(?:(?:(?:/(?P<episode_slug>[\\w-]+))|/?)(?:(?:/(?P<path_param>\\w+))|/?))|/?)/?$'
So because the tornado plugin uses the matcher._path, it's can't translate to an OpenApi compliant path.
Is there anything I can do about it?
The text was updated successfully, but these errors were encountered: