swagger-api / swagger-api/swagger-codegen
[Go] codegen doesn't work on WikiPedia's swagger spec
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Code generation for Go language fails when I use swaggerapi/swagger-codegen-cli Docker image for WikiPedia's updates stream. I have following error message:
[main] INFO io.swagger.parser.Swagger20Parser - reading from https://stream.wikimedia.org/?spec
[main] INFO io.swagger.parser.Swagger20Parser - reading from https://stream.wikimedia.org/?spec
[main] WARN io.swagger.codegen.ignore.CodegenIgnoreProcessor - Output directory does not exist, or is inaccessible. No file (.swagger-codegen-ignore) will be evaluated.
Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:735)
at io.swagger.codegen.cmd.Generate.run(Generate.java:285)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
Codegeneration for Pet Store example works ok for Go language.
Swagger-codegen version
2.4.0-SNAPSHOT
Swagger declaration file content or url
https://stream.wikimedia.org/?spec
Command line used for generation
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate -i https://stream.wikimedia.org/?spec -l go -o /local/out/go
Steps to reproduce
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate -i https://stream.wikimedia.org/?spec -l go -o /local/out/go
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 running the Docker command against https://stream.wikimedia.org/?spec and compare it with the working Pet Store example. Read the reported path through DefaultGenerator.java and Generate.run; done means Go code generation completes for the Wikimedia URL without the missing swagger input or config error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100