swagger-api / swagger-api/swagger-codegen
Error : missing swagger input or config! on docker image
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Docker image : latest
Issue :
Unable to generate code from OpenAPI v3 documentation file. The command that i used is :
docker run --rm -v .:/app swaggerapi/swagger-codegen-cli generate \
-i /app/openapi_hermes_v1.10.0.json \
-l html2 \
-o /app/output
Error that i got when running the command :
[main] INFO io.swagger.parser.Swagger20Parser - reading from /app/openapi_hermes_v1.10.0.json
[main] INFO io.swagger.parser.Swagger20Parser - reading from /app/openapi_hermes_v1.10.0.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)
On Stackoverflow forum, i found that the 2.x version supports only the swagger schema.
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
Reproduce the Docker command with the supplied OpenAPI v3 input, then inspect the stack-trace locations in DefaultGenerator.java, Generate.run, and SwaggerCodegen.main. Determine whether the CLI accepts this input and make the behavior or documentation clearly handle the reported case; verify the same command afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, openapi
- Domain
- backend-api-design, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100