From b2de4d8dca53eb8cc612fb037d3bc9e17c129653 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Tue, 18 Oct 2022 23:54:35 +0800
Subject: [PATCH 01/17] update echo to newer version

---
 .../src/main/resources/go-echo-server/go-mod.mustache           | 2 +-
 samples/server/petstore/go-echo-server/go.mod                   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/go-echo-server/go-mod.mustache b/modules/openapi-generator/src/main/resources/go-echo-server/go-mod.mustache
index 4b31aa41c83..c1a4ac15ece 100644
--- a/modules/openapi-generator/src/main/resources/go-echo-server/go-mod.mustache
+++ b/modules/openapi-generator/src/main/resources/go-echo-server/go-mod.mustache
@@ -2,4 +2,4 @@ module github.com/{{{gitUserId}}}/{{{gitRepoId}}}
 
 go 1.16
 
-require github.com/labstack/echo/v4 v4.2.0
+require github.com/labstack/echo/v4 v4.9.0
diff --git a/samples/server/petstore/go-echo-server/go.mod b/samples/server/petstore/go-echo-server/go.mod
index a7d3a57f619..586002dcc6c 100644
--- a/samples/server/petstore/go-echo-server/go.mod
+++ b/samples/server/petstore/go-echo-server/go.mod
@@ -2,4 +2,4 @@ module github.com/GIT_USER_ID/GIT_REPO_ID
 
 go 1.16
 
-require github.com/labstack/echo/v4 v4.2.0
+require github.com/labstack/echo/v4 v4.9.0
-- 
GitLab


From 1cbd8e0eb304ba11ac725fd0388653eb4da86df5 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 10:43:51 +0800
Subject: [PATCH 02/17] add github workflow

---
 .github/workflows/samples-go.yaml | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 .github/workflows/samples-go.yaml

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
new file mode 100644
index 00000000000..a2b7a156c6b
--- /dev/null
+++ b/.github/workflows/samples-go.yaml
@@ -0,0 +1,29 @@
+name: Samples Go 
+
+on:
+  push:
+    paths:
+      - 'samples/server/petstore/go-echo-server/**'
+  pull_request:
+    paths:
+      - 'samples/server/petstore/go-echo-server/**'
+
+jobs:
+  build:
+    name: Build Go 
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        sample:
+          - samples/server/petstore/go-echo-server/
+    steps:
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-go@v3
+        with:
+          go-version: '>=1.17.0'
+      - run: go version
+      - name: Build
+        working-directory: ${{ matrix.sample }}
+        run: go test -v
-- 
GitLab


From 43454a9fe458786b3ab988b40da4499b05255025 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 10:45:34 +0800
Subject: [PATCH 03/17] minor fix

---
 .github/workflows/samples-go.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index a2b7a156c6b..50ebbcb57ce 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -17,7 +17,6 @@ jobs:
       matrix:
         sample:
           - samples/server/petstore/go-echo-server/
-    steps:
     steps:
       - uses: actions/checkout@v3
       - uses: actions/setup-go@v3
-- 
GitLab


From a48b0969af23705c77e3b9a256e3ec78b6c2bd8b Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 10:50:48 +0800
Subject: [PATCH 04/17] add install

---
 .github/workflows/samples-go.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index 50ebbcb57ce..3bc918de0a7 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -23,6 +23,9 @@ jobs:
         with:
           go-version: '>=1.17.0'
       - run: go version
+      - name: Install
+        working-directory: ${{ matrix.sample }}
+        run: go mod download github.com/labstack/echo/v4
       - name: Build
         working-directory: ${{ matrix.sample }}
         run: go test -v
-- 
GitLab


From 3dc2023dac010d0182942ce1240f6ff69a9a69fb Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 10:58:50 +0800
Subject: [PATCH 05/17] go get

---
 .github/workflows/samples-go.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index 3bc918de0a7..f76525af3c4 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -25,7 +25,7 @@ jobs:
       - run: go version
       - name: Install
         working-directory: ${{ matrix.sample }}
-        run: go mod download github.com/labstack/echo/v4
+        run: go get github.com/labstack/echo/v4@v4.9.0
       - name: Build
         working-directory: ${{ matrix.sample }}
         run: go test -v
-- 
GitLab


From d0096e13589e05ab56389943780142ef4ef3df81 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:09:32 +0800
Subject: [PATCH 06/17] install middleware

---
 .github/workflows/samples-go.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index f76525af3c4..31b6afdf08f 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -25,7 +25,9 @@ jobs:
       - run: go version
       - name: Install
         working-directory: ${{ matrix.sample }}
-        run: go get github.com/labstack/echo/v4@v4.9.0
+        run: |
+          go get github.com/labstack/echo/v4/middleware@v4.9.0
+          go get github.com/labstack/echo/v4@v4.9.0
       - name: Build
         working-directory: ${{ matrix.sample }}
         run: go test -v
-- 
GitLab


From 42f24e578ff5a0e0b2be5fa1c506be237ec4cbe0 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:13:21 +0800
Subject: [PATCH 07/17] test go api server

---
 .github/workflows/samples-go.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index 31b6afdf08f..fe685f3912a 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -4,9 +4,11 @@ on:
   push:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
+      - 'samples/server/petstore/go-api-server/**'
   pull_request:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
+      - 'samples/server/petstore/go-api-server/**'
 
 jobs:
   build:
-- 
GitLab


From 2a78d84977569e18b18f9adb9d687c5c52e66a09 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:16:10 +0800
Subject: [PATCH 08/17] trigger build

---
 samples/server/petstore/go-api-server/README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/samples/server/petstore/go-api-server/README.md b/samples/server/petstore/go-api-server/README.md
index 7a0c3bb1119..4a7de232ed2 100644
--- a/samples/server/petstore/go-api-server/README.md
+++ b/samples/server/petstore/go-api-server/README.md
@@ -31,3 +31,5 @@ Once image is built use
 ```
 docker run --rm -it petstoreserver
 ```
+
+
-- 
GitLab


From 6e981c3a5c9173a2c53fc8bf8480be1de918d738 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:18:16 +0800
Subject: [PATCH 09/17] test go-api-server

---
 .github/workflows/samples-go.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index fe685f3912a..a46a7ea9c22 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -19,6 +19,7 @@ jobs:
       matrix:
         sample:
           - samples/server/petstore/go-echo-server/
+          - samples/server/petstore/go-api-server/
     steps:
       - uses: actions/checkout@v3
       - uses: actions/setup-go@v3
-- 
GitLab


From 7ce773275b0c223208421eff9d84b64a079874be Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:34:36 +0800
Subject: [PATCH 10/17] Revert "test go api server"

This reverts commit 42f24e578ff5a0e0b2be5fa1c506be237ec4cbe0.
---
 .github/workflows/samples-go.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index a46a7ea9c22..b85e8fb67c9 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -4,11 +4,9 @@ on:
   push:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
-      - 'samples/server/petstore/go-api-server/**'
   pull_request:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
-      - 'samples/server/petstore/go-api-server/**'
 
 jobs:
   build:
-- 
GitLab


From a270c97bdaf32146eb278bf15883112708ce4657 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:34:57 +0800
Subject: [PATCH 11/17] Revert "Revert "test go api server""

This reverts commit 7ce773275b0c223208421eff9d84b64a079874be.
---
 .github/workflows/samples-go.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index b85e8fb67c9..a46a7ea9c22 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -4,9 +4,11 @@ on:
   push:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
+      - 'samples/server/petstore/go-api-server/**'
   pull_request:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
+      - 'samples/server/petstore/go-api-server/**'
 
 jobs:
   build:
-- 
GitLab


From 77aabf76af63e67711e42f4688e78cf008b4e07f Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:35:23 +0800
Subject: [PATCH 12/17] update samples

---
 samples/server/petstore/go-api-server/README.md | 2 --
 1 file changed, 2 deletions(-)

diff --git a/samples/server/petstore/go-api-server/README.md b/samples/server/petstore/go-api-server/README.md
index 4a7de232ed2..7a0c3bb1119 100644
--- a/samples/server/petstore/go-api-server/README.md
+++ b/samples/server/petstore/go-api-server/README.md
@@ -31,5 +31,3 @@ Once image is built use
 ```
 docker run --rm -it petstoreserver
 ```
-
-
-- 
GitLab


From 120516856eaa5adbeebc558a68be8e26797b8749 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:36:23 +0800
Subject: [PATCH 13/17] test go gin in github workflow

---
 .github/workflows/samples-go.yaml | 3 +++
 pom.xml                           | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index a46a7ea9c22..03e0ba2d0ce 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -5,10 +5,12 @@ on:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
       - 'samples/server/petstore/go-api-server/**'
+      - 'samples/server/petstore/go-gin-api-server/**'
   pull_request:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
       - 'samples/server/petstore/go-api-server/**'
+      - 'samples/server/petstore/go-gin-api-server/**'
 
 jobs:
   build:
@@ -20,6 +22,7 @@ jobs:
         sample:
           - samples/server/petstore/go-echo-server/
           - samples/server/petstore/go-api-server/
+          - samples/server/petstore/go-gin-api-server/
     steps:
       - uses: actions/checkout@v3
       - uses: actions/setup-go@v3
diff --git a/pom.xml b/pom.xml
index 7ca26d656a7..a13a3dd7ac9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1333,10 +1333,6 @@
                 <!-- test Go projects -->
                 <module>samples/client/petstore/go</module>
                 <module>samples/openapi3/client/petstore/go</module>
-                <module>samples/server/petstore/go-api-server</module>
-                <!-- comment out due to Go version
-                <module>samples/server/petstore/go-gin-api-server</module>-->
-                <module>samples/server/petstore/go-echo-server</module>
             </modules>
         </profile>
         <profile>
-- 
GitLab


From ec099b48c138c2a03503bbf1de8995cbca2d7598 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:38:09 +0800
Subject: [PATCH 14/17] go install

---
 .github/workflows/samples-go.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index 03e0ba2d0ce..c07bd9313c9 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -32,8 +32,8 @@ jobs:
       - name: Install
         working-directory: ${{ matrix.sample }}
         run: |
-          go get github.com/labstack/echo/v4/middleware@v4.9.0
-          go get github.com/labstack/echo/v4@v4.9.0
+          go install github.com/labstack/echo/v4/middleware@v4.9.0
+          go install github.com/labstack/echo/v4@v4.9.0
       - name: Build
         working-directory: ${{ matrix.sample }}
         run: go test -v
-- 
GitLab


From 2226376e67585a6d8e5c24fd29071e948db45ea6 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:42:24 +0800
Subject: [PATCH 15/17] Revert "go install"

This reverts commit ec099b48c138c2a03503bbf1de8995cbca2d7598.
---
 .github/workflows/samples-go.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index c07bd9313c9..03e0ba2d0ce 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -32,8 +32,8 @@ jobs:
       - name: Install
         working-directory: ${{ matrix.sample }}
         run: |
-          go install github.com/labstack/echo/v4/middleware@v4.9.0
-          go install github.com/labstack/echo/v4@v4.9.0
+          go get github.com/labstack/echo/v4/middleware@v4.9.0
+          go get github.com/labstack/echo/v4@v4.9.0
       - name: Build
         working-directory: ${{ matrix.sample }}
         run: go test -v
-- 
GitLab


From 15223d4586ef655e387d362a075476cbfcfa0373 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:42:34 +0800
Subject: [PATCH 16/17] Revert "test go gin in github workflow"

This reverts commit 120516856eaa5adbeebc558a68be8e26797b8749.
---
 .github/workflows/samples-go.yaml | 3 ---
 pom.xml                           | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index 03e0ba2d0ce..a46a7ea9c22 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -5,12 +5,10 @@ on:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
       - 'samples/server/petstore/go-api-server/**'
-      - 'samples/server/petstore/go-gin-api-server/**'
   pull_request:
     paths:
       - 'samples/server/petstore/go-echo-server/**'
       - 'samples/server/petstore/go-api-server/**'
-      - 'samples/server/petstore/go-gin-api-server/**'
 
 jobs:
   build:
@@ -22,7 +20,6 @@ jobs:
         sample:
           - samples/server/petstore/go-echo-server/
           - samples/server/petstore/go-api-server/
-          - samples/server/petstore/go-gin-api-server/
     steps:
       - uses: actions/checkout@v3
       - uses: actions/setup-go@v3
diff --git a/pom.xml b/pom.xml
index a13a3dd7ac9..7ca26d656a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1333,6 +1333,10 @@
                 <!-- test Go projects -->
                 <module>samples/client/petstore/go</module>
                 <module>samples/openapi3/client/petstore/go</module>
+                <module>samples/server/petstore/go-api-server</module>
+                <!-- comment out due to Go version
+                <module>samples/server/petstore/go-gin-api-server</module>-->
+                <module>samples/server/petstore/go-echo-server</module>
             </modules>
         </profile>
         <profile>
-- 
GitLab


From 59ea5aa81dc567f08f56fdfe11152a31bed8ffb2 Mon Sep 17 00:00:00 2001
From: William Cheng <wing328hk@gmail.com>
Date: Wed, 19 Oct 2022 11:51:20 +0800
Subject: [PATCH 17/17] remove go api, echo server tests

---
 pom.xml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7ca26d656a7..fea1d15a1c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1333,10 +1333,8 @@
                 <!-- test Go projects -->
                 <module>samples/client/petstore/go</module>
                 <module>samples/openapi3/client/petstore/go</module>
-                <module>samples/server/petstore/go-api-server</module>
                 <!-- comment out due to Go version
                 <module>samples/server/petstore/go-gin-api-server</module>-->
-                <module>samples/server/petstore/go-echo-server</module>
             </modules>
         </profile>
         <profile>
-- 
GitLab