swagger-api / swagger-api/swagger-codegen
Python Client Code Gen Generate Broken Python Code
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Swagger-codegen version
The online editor: http://editor.swagger.io/.
Swagger declaration file content or url
https://gist.github.com/wy193777/e2da6ad64259cc1ad6a672aae55b1d23
Command line used for generation
From web UI, no Command line used.
Steps to reproduce
import generated code swagger_client to a project.
Then import error will be print out.
Related issues/PRs
Suggest a fix/enhancement
I fixed the problem by manually delete several unnecessary imports on generated code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Swagger Editor generation flow and the generated swagger_client package from the linked declaration. Reproduce the import error, inspect which generated imports are unnecessary, and confirm that the generated Python client imports cleanly without manual edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100