/extended-gin-go-server-openapi-generator

A more extensible openapi generator for a gin-go type http server

Primary LanguageJavaMIT LicenseMIT

OpenAPI Generator for the extended-gin-go-server library

Usage

  1. Clone repository
  2. Build the generator using the provided Dockerfile
  3. Use the previously built docker image to generate your server stub

What I explained above, but in code:

Step 1

git clone https://github.com/ebarti/extended-gin-go-server-openapi-generator.git
cd extended-gin-go-server-openapi-generator

Step 2

docker build . -t ext-go-gin-generator

Step 3

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"