Trax-air / swagger-tester

Automatically test your swagger API
MIT License
104 stars 36 forks source link

'valid' swagger yaml yields stack trace from connexion #26

Closed zdelagrange closed 7 years ago

zdelagrange commented 8 years ago

Hey guys, I'm back on to some swagger stuff lately, and after updating to the latest version of the package, i've run into this stack trace. I'll be digging into it, but if you have any insight, let me know. This stack seems to be repeated for every end point. It might be a problem with my swagger yaml though.

ERROR:connexion.api:Failed to add operation for GET <url removed> Traceback (most recent call last): File "/home/zdelagrange/.virtualenvs/<venv>/local/lib/python2.7/site-packages/connexion/api.py", line 187, in add_paths self.add_operation(method, path, endpoint, path_parameters) File "/home/zdelagrange/.virtualenvs/<venv>/local/lib/python2.7/site-packages/connexion/api.py", line 160, in add_operation resolver=self.resolver) File "/home/zdelagrange/.virtualenvs/<venv>/local/lib/python2.7/site-packages/connexion/operation.py", line 168, in __init__ resolution = resolver.resolve(self) File "/home/zdelagrange/.virtualenvs/<venv>/local/lib/python2.7/site-packages/connexion/resolver.py", line 50, in resolve return Resolution(self.resolve_function_from_operation_id(operation_id), operation_id) File "/home/zdelagrange/.virtualenvs/<venv>/local/lib/python2.7/site-packages/connexion/resolver.py", line 71, in resolve_function_from_operation_id return self.function_resolver(operation_id) File "/home/zdelagrange/.virtualenvs/<venv>/local/lib/python2.7/site-packages/connexion/utils.py", line 106, in get_function_from_name module_name, attr_path1 = module_name.rsplit('.', 1) ValueError: need more than 1 value to unpack

cyprieng commented 8 years ago

Hi, sorry for the delay. To be honest I don't know where this error come from, but it seems to be an issue with connexion. Did you try to run the API with connexion without using swagger-tester ?

zdelagrange commented 8 years ago

Hey no problem! The application is utilizing connexion in production, which is why this seems so weird. I could be that we are using a configuration that maybe the swagger-parser doesn't implement, or possibly a bug in swagger parser. I think for the moment I'm going to look into testing with a live app instead of having swagger-tester use connexion, but I could revisit this and try to produce a swagger spec that i can share that reproduces this error

cyprieng commented 7 years ago

I close this issue. If you have still a bug, just reopen it and post the swagger.yaml.