swagger-api / swagger-api/swagger-codegen
Android Codegenerator generates import statement for APIs without models
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Android Codegenerator generates import statement for APIs without models. This results in the compiler not to be able to resolve the term "Model" in
import io.swagger.client.model.*;
Swagger-codegen version
Swagger version: 2.2.1, tagged zip downloaded and installed by maven on windows
Swagger declaration file content or url
Any file that doesnt produce any models
Command line used for generation
java -jar ../swagger-codegen-2.2.1/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i >URL to declaration file< -l android
Steps to reproduce
Generate the code - done
Related issues
nothing found. sorry
Suggest a Fix
the import statement should be omittet if there are no models
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 Android generator invoked by the swagger-codegen-cli.jar command and reproduce the issue using a Swagger declaration that produces no models. Trace where the generated import io.swagger.client.model.* is emitted; done means the import is absent for model-free APIs and the generated Android code compiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100