-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update Go generator based on improved SDK from Decentro
- Loading branch information
Showing
10 changed files
with
90 additions
and
210 deletions.
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
generator/konfig-generator-api/src/main/resources/go/api_doc_example_param_example.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{{#isString}}"{{example}}"{{/isString}}{{^isString}}{{>api_doc_example_param_non_string_example}}{{/isString}} |
1 change: 1 addition & 0 deletions
1
...fig-generator-api/src/main/resources/go/api_doc_example_param_non_string_example.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{{#isBinary}}emptyFile(t){{/isBinary}}{{^isBinary}}{{#isBodyParam}}{{paramName}}{{/isBodyParam}}{{^isBodyParam}}{{example}}{{/isBodyParam}}{{/isBinary}} |
13 changes: 13 additions & 0 deletions
13
generator/konfig-generator-api/src/main/resources/go/api_doc_example_params.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{#allParams}} | ||
{{#isBodyParam}} | ||
{{paramName}} := *{{goImportAlias}}.New{{dataType}}( | ||
{{#requiredVars}} | ||
{{> api_doc_example_param_example}}, | ||
{{/requiredVars}} | ||
) | ||
{{#optionalVars}} | ||
{{paramName}}.Set{{name}}({{> api_doc_example_param_example}}) | ||
{{/optionalVars}} | ||
{{/isBodyParam}} | ||
request.{{paramNameCamelCaseUpper}}({{> api_doc_example_param_example}}) | ||
{{/allParams}} |
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.