OpenAPI Generator for the extended-gin-go-server library
- Clone repository
- Build the generator using the provided Dockerfile
- Use the previously built docker image to generate your server stub
What I explained above, but in code:
git clone https://github.com/ebarti/extended-gin-go-server-openapi-generator.git
cd extended-gin-go-server-openapi-generator
docker build . -t ext-go-gin-generator
docker run --rm -v ${PWD}:/local ext-go-gin-generator generate \
-i /local/mylocalPath/spec/myApiSpec.yaml \
-c /local/mylocalPath/config/myConfig.yaml \
-g extended-gin-go-server \
-o /local/generated
Example of a configuration file
additionalProperties:
hideGenerationTimestamp: true
packageVersion: "0.0.2"
serverPort: "8080"
gitHost: "github.com"
gitUserId: "ebarti"
gitRepoId: "myRepo"
sourceFolder: "go-myrepo-server"
infoEmail: "me@eloibarti.com"
infoUrl: "eloibarti.com"