swagger-api / swagger-api/swagger-codegen
[JAVA][Retrofit2] How to use auto-generated client 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 generates instructions how to use auto-generated client code:
Eg. https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/java/retrofit2/docs/PetApi.md
However, Configuration and ApiException used in the example code don't exist in the generated sources.
So, how to use it?
Swagger-codegen version
2.3.0
Command line used for generation
I'm using gradle plugin.
Steps to reproduce
Generate java code using Retrofit2 library from PetStore API example.
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
Compare the generated Retrofit2 PetStore sources with the referenced samples/client/petstore/java/retrofit2/docs/PetApi.md instructions. Reproduce generation through the Gradle plugin, then inspect where Configuration and ApiException are referenced or expected; done means the generated sources and usage instructions agree and the example can be followed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100