swagger-api / swagger-api/swagger-codegen

[3.0.0] [general] run-in-docker.sh script is not working. bin/go/petstore*.go neither.

Open
#10,015 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Hey, I have checked out the HEAD of the 3.0.0 branch (29f4107fe812c155ebacdb7d32dfef866e11a568) and tried to run the generator.
I do not have java installed, so I tried to use the ./run-in-docker.sh script. It didn't work. I will be posting a PR to fix it soon.

Same for the ./bin/go-petstore.go, and ./bin/go-petstore-server.go. This is also fixed in the incoming PR.
To reproduce:

./run-in-docker.sh generate                                                                                                                                                                         11:03:55
++ dirname ./run-in-docker.sh
+ cd .
+ maven_cache_repo=/Users/maciejgalkowski/.m2/repository
+ mkdir -p /Users/maciejgalkowski/.m2/repository
++ id -u
++ id -g
+ docker run --rm -it -w /gen -e GEN_DIR=/gen -e MAVEN_CONFIG=/var/maven/.m2 -u 503:20 -v /Users/maciejgalkowski/code/swagger-codegen:/gen -v /Users/maciejgalkowski/.m2/repository:/var/maven/.m2/repository --entrypoint /gen/docker-entrypoint.sh maven:3-jdk-8 generate
grep: /gen/modules/swagger-codegen-cli/src/main/java/io/swagger/codegen/cmd/*.java: No such file or directory
/gen/docker-entrypoint.sh: line 23: exec: generate: not found

The generator scripts have similar problems with the wrong template paths being provided. When running
./run-in-docker.sh ./bin/go-petstore.sh there is no error printed, nor there are any samples generated in the ./samples/client/petstore/go dir.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the commands in run-in-docker.sh and ./bin/go-petstore.sh, then inspect docker-entrypoint.sh and the named bin/go-petstore.go and bin/go-petstore-server.go files. Compare the paths used by these scripts with the repository layout; done means the Docker generator runs successfully and Go petstore samples appear in samples/client/petstore/go.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, shell
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.