Use gitHost instead of github.com (#15720)

This commit is contained in:
Olivier Sechet 2023-06-03 05:08:33 +02:00 committed by GitHub
parent 05b9a899e4
commit 65bee03e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 8 deletions

View File

@ -2,5 +2,8 @@ generatorName: go-echo-server
outputDir: samples/server/petstore/go-echo-server
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/go-echo-server
gitHost: gitlab.com
gitUserId: openapitools
gitRepoId: petstore
additionalProperties:
hideGenerationTimestamp: "true"

View File

@ -1,7 +1,7 @@
package handlers
{{#operations}}
import (
"github.com/{{{gitUserId}}}/{{{gitRepoId}}}/models"
"{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}/models"
"github.com/labstack/echo/v4"
"net/http"
){{#operation}}

View File

@ -1,4 +1,4 @@
module github.com/{{{gitUserId}}}/{{{gitRepoId}}}
module {{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}
go 1.16

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/{{{gitUserId}}}/{{{gitRepoId}}}/handlers"
"{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}/handlers"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)

View File

@ -1,4 +1,4 @@
module github.com/GIT_USER_ID/GIT_REPO_ID
module gitlab.com/openapitools/petstore
go 1.16

View File

@ -1,6 +1,6 @@
package handlers
import (
"github.com/GIT_USER_ID/GIT_REPO_ID/models"
"gitlab.com/openapitools/petstore/models"
"github.com/labstack/echo/v4"
"net/http"
)

View File

@ -1,6 +1,6 @@
package handlers
import (
"github.com/GIT_USER_ID/GIT_REPO_ID/models"
"gitlab.com/openapitools/petstore/models"
"github.com/labstack/echo/v4"
"net/http"
)

View File

@ -1,6 +1,6 @@
package handlers
import (
"github.com/GIT_USER_ID/GIT_REPO_ID/models"
"gitlab.com/openapitools/petstore/models"
"github.com/labstack/echo/v4"
"net/http"
)

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/GIT_USER_ID/GIT_REPO_ID/handlers"
"gitlab.com/openapitools/petstore/handlers"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)