-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Style][Go] standardize the format of mustache (tiny change) (#17363)
* fix: change indent style to tab in the mustache to generate Go code * docs: standardize the language names for code blocks * docs: change indent style to tab in the code blocks * update: regenerate samples * `./bin/generate-samples.sh ./bin/configs/*.yaml`
- Loading branch information
1 parent
10da7a3
commit 004c7e8
Showing
65 changed files
with
1,792 additions
and
1,789 deletions.
There are no files selected for viewing
14 changes: 7 additions & 7 deletions
14
modules/openapi-generator/src/main/resources/go-echo-server/api.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
package handlers | ||
{{#operations}} | ||
import ( | ||
"{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}/models" | ||
"github.com/labstack/echo/v4" | ||
"net/http" | ||
"{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}/models" | ||
"github.com/labstack/echo/v4" | ||
"net/http" | ||
){{#operation}} | ||
|
||
// {{nickname}} - {{{summary}}} | ||
{{#isDeprecated}} | ||
// Deprecated | ||
{{/isDeprecated}} | ||
func (c *Container) {{operationId}}(ctx echo.Context) error { | ||
return ctx.JSON(http.StatusOK, models.HelloWorld { | ||
Message: "Hello World", | ||
}) | ||
return ctx.JSON(http.StatusOK, models.HelloWorld { | ||
Message: "Hello World", | ||
}) | ||
} | ||
{{/operation}}{{/operations}} | ||
{{/operation}}{{/operations}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.