swagger-api / swagger-api/swagger-codegen
Swagger codegen RX JAVA + Retrofit not working
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I tried to export RX JAVA + Retrofit client from swagger hub , by entering Codegen Options and enabling check box of (useRxJava2) in the java client , however when i export the java client it does not work as expected and the code doesn't have neither retrofit nor rx java ! (uses oktthp only)
Also i tried to download the json file from swagger hub (Export -> Download Api) and followed the steps here
RX JAVA + Retrofit sdk generation using Swagger codegen
But when i run the command , i get this in the command line :
[main] INFO io.swagger.parser.Swagger20Parser - reading from openapi.json
[main] INFO io.swagger.parser.Swagger20Parser - reading from openapi.json
[main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No .swagger-codeg
en-ignore file found.
Exception in thread "main" java.lang.RuntimeException: missing swagger input or
config!
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:13
2)
at io.swagger.codegen.cmd.Generate.run(Generate.java:223)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:36)
Any clue how can i bypass this ?
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 generation command that reads openapi.json and the DefaultGenerator.generate and Generate.run entries shown in the stack trace. Verify how the input and config arguments are supplied, then confirm that generation produces a Java client using Retrofit and RxJava2 rather than only OkHttp, without the missing-input/config failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100