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 outputDir: samples/server/petstore/go-echo-server
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/go-echo-server templateDir: modules/openapi-generator/src/main/resources/go-echo-server
gitHost: gitlab.com
gitUserId: openapitools
gitRepoId: petstore
additionalProperties: additionalProperties:
hideGenerationTimestamp: "true" hideGenerationTimestamp: "true"

View File

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

View File

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

View File

@ -1,7 +1,7 @@
package main package main
import ( import (
"github.com/{{{gitUserId}}}/{{{gitRepoId}}}/handlers" "{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}/handlers"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware" "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 go 1.16

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
package main package main
import ( 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"
"github.com/labstack/echo/v4/middleware" "github.com/labstack/echo/v4/middleware"
) )