Skip to content
New issue

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

AttributeError exception while generating code #137

Open
marco-a-itl opened this issue Feb 14, 2019 · 0 comments
Open

AttributeError exception while generating code #137

marco-a-itl opened this issue Feb 14, 2019 · 0 comments

Comments

@marco-a-itl
Copy link

Trying to generate code for flask with the following yaml file

https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/blob/master/Mp1.yaml

I get this exception:

[root@dev-local swagger_test]# swagger_py_codegen --swagger-doc Mp1.yaml -tlp flask mp1_flask
generate    mp1_flask/mp1_flask/exampleAPI_mp1_v1/schemas.py
Traceback (most recent call last):
  File "/src/var/mec/prova_venv/bin/swagger_py_codegen", line 10, in <module>
    sys.exit(generate())
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/swagger_py_codegen/command.py", line 200, in generate
    for code in generator.generate():
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/swagger_py_codegen/base.py", line 47, in generate
    for code in self._process():
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/swagger_py_codegen/flask.py", line 203, in _process
    views = self._process_data()
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/swagger_py_codegen/flask.py", line 164, in _process_data
    url, params = _swagger_to_flask_url(swagger_path, data)
  File "/src/var/mec/prova_venv/lib/python2.7/site-packages/swagger_py_codegen/flask.py", line 81, in _swagger_to_flask_url
    for old, new in _type(param.get('parameters', [])):
AttributeError: 'list' object has no attribute 'get'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant