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

[BUG][Python-experimental] UnboundLocalError: local variable 'obj_dict' referenced before assignment #5550

Closed
6 tasks
sebastien-rosset opened this issue Mar 6, 2020 · 0 comments

Comments

@sebastien-rosset
Copy link
Contributor

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

When invoking a Python API to create a composed model, the following error is raised:

UnboundLocalError: local variable 'obj_dict' referenced before assignment

I think this is because at this line, we are missing a condition for ModelComposed:
modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache:249

openapi-generator version

master March 6th 2020

OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants