swagger-api / swagger-api/swagger-codegen
Program does not compiles on Ubuntu correctly?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Title: Swagger Codegen fails to generate Python client - missing swagger input or config
Description:
When attempting to generate a Python client using Swagger Codegen, the following error occurs: Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
Command Used
java -jar swagger-codegen-cli.jar generate -i https://poligon.aidevs.pl/swagger/poligon.json -l python -o ./poligon_client
My configuration does not meet the requirements to compile the tool correctly or perhaps there is incorrect behaviour on my side? Please be understanding, I am not familiar with java.
The data:
damian@dgiebas-ubu-i4b-pl ~/t/s/m/s/target (master)> java -jar swagger-codegen-cli.jar generate -i https://poligon.aidevs.pl/swagger/poligon.json -l python -o ./poligon_client
[main] INFO io.swagger.parser.Swagger20Parser - reading from https://poligon.aidevs.pl/swagger/poligon.json
[main] INFO io.swagger.parser.Swagger20Parser - reading from https://poligon.aidevs.pl/swagger/poligon.json
[main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No .swagger-codegen-ignore file found.
Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:766)
at io.swagger.codegen.cmd.Generate.run(Generate.java:307)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
damian@dgiebas-ubu-i4b-pl ~/t/s/m/s/target (master)> java -jar swagger-codegen-cli.jar generate --help
Exception in thread "main" io.airlift.airline.ParseArgumentsUnexpectedException: Found unexpected parameters: [--help]
at io.airlift.airline.Cli.validate(Cli.java:194)
at io.airlift.airline.Cli.parse(Cli.java:132)
at io.airlift.airline.Cli.parse(Cli.java:108)
at io.airlift.airline.Cli.parse(Cli.java:103)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
damian@dgiebas-ubu-i4b-pl ~/t/s/m/s/target (master)> java --version
openjdk 21.0.6 2025-01-21
OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)
damian@dgiebas-ubu-i4b-pl ~/t/s/m/s/target (master)> mvn --version
Apache Maven 3.8.7
Maven home: /usr/share/maven
Java version: 21.0.6, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.8.0-57-generic", arch: "amd64", family: "unix"
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 by reproducing the documented java -jar swagger-codegen-cli.jar generate command with the supplied Swagger URL and Python target. Read the stack trace entry points io.swagger.codegen.cmd.Generate.run and io.swagger.codegen.DefaultGenerator.generate, and compare the behavior with the reported Java and Maven versions. Done means the cause of the missing input or config error is identified and generation behavior is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100