We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
when I pass my Falcon resource to apispec I got this error:
loginResource = LoginResource(user_service) deviceResource = DeviceResource() api.add_route('/api/login', loginResource) api.add_route('/api/devices', deviceResource) # Create an APISpec from apispec import APISpec from apispec.ext.marshmallow import MarshmallowPlugin from falcon_apispec import FalconPlugin spec = APISpec( title='Swagger Backend API', version='1.0.0', openapi_version='2.0', plugins=[ FalconPlugin(api), MarshmallowPlugin(), ], ) # pass created resource into `path` for APISpec spec.path(resource=deviceResource)
$ python -u test.py Traceback (most recent call last): File "test.py", line 214, in <module> spec.path(resource=deviceResource) File "C:\Work\Analytics\git\test\falcon-test\.venv\lib\site-packages\apispec\core.py", line 347, in path path=path, operations=operations, parameters=parameters, **kwargs File "C:\Work\Analytics\git\test\falcon-test\.venv\lib\site-packages\falcon_apispec\falcon_plugin.py", line 30, in path_helper resource_uri_mapping = self._generate_resource_uri_mapping(self._app) File "C:\Work\Analytics\git\test\falcon-test\.venv\lib\site-packages\falcon_apispec\falcon_plugin.py", line 23, in _generate_resource_uri_mapping mapping[resource] = uri TypeError: unhashable type: 'LoginResource'
which is not on the resource I have added... Any idea ?
Thanks!
The text was updated successfully, but these errors were encountered:
What version of falcon-apispec and apispec are you using?
Sorry, something went wrong.
$ pip freeze apispec==2.0.2 Beaker==1.10.1 falcon==2.0.0 falcon-apispec==0.3.0 falcon-auth==2.0.1 falcon-middleware-beaker==0.0.1 falcon-policy==0.2.0 gunicorn==19.9.0 marshmallow==2.19.5 mohawk==1.0.0 PyJWT==1.7.1 PyYAML==5.1.1 six==1.12.0 Yapsy==1.12.0
did it help ?
Sorry for the delay, will be taking a look at this tonight or tomorrow night.
@shazz Could you share the LoginResource you are using? Not sure how your __init__ works.
LoginResource
__init__
alysivji
No branches or pull requests
Hi,
when I pass my Falcon resource to apispec I got this error:
which is not on the resource I have added...
Any idea ?
Thanks!
The text was updated successfully, but these errors were encountered: