You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for static template generation control (#1674)
* Add support for static template generation control
- Add 'static' boolean flag to individual templates to mark them as static content
- Add 'generateStaticTemplates' generator option to control default behavior
- Static templates are skipped when generateStaticTemplates is false for the session
- Session-level .zap file settings can override the generator default
* Apply suggestions from code review
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: docs/sdk-integration.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,7 @@ The `templates` key contained in the `gen-templates.json` file above, is an arra
79
79
| name | string | Human readable name of the template. Mostly used in logging and menu items. |
80
80
| output | string | Name of the output file generated. May contain replacement patterns (see below). |
81
81
| iterator | string | If this template produces multiple files, iterating over certain object, then this field will be present. Possible values are `availableCluster`, `selectedCluster`,`selectedClientCluster`, `selectedServerCluster`. |
82
+
| static | string | If set to the string 'true', marks this template as a static template. Static templates will not generate if `generateStaticTemplates` is false for the session. |
82
83
83
84
The _replacement pattern_ inside the output key, comes handy when iterator key is used and defines how each generated file will be named. Replacement patterns are in a format of `{key}` or `{key:modifier}`. The `key` can be any usual key that the iterated object provides. For example, if you iterate over cluster, these can be `code`, `name`, `description`, `define` and all the usual keys that a cluster supports. So if your output contains `{code}` then this pattern will be replaced by the actual cluster code.
84
85
@@ -105,6 +106,7 @@ Following table lists generator options supported by the template generator cate
105
106
| postProcessSingle | a string, representing a command to execute for each individual file appended in a single command line. This would be typically used by commands or scripts that clean up the generated files, and can only take one file name at a time as an argument. |
106
107
| postProcessConditionalFile | a path, representing a file. If this file does not exist, then a specified post-process action will not get executed. |
107
108
| routeErrToOut | a boolean flag. If it's set to true, then any stderr from the post-process will be routed to stdout. This is due that a driving process sometimes has trouble dealing with both stdout and stderr, so this flag might help you preserve the logs. |
109
+
| generateStaticTemplates | string | A string flag ('true'/'false'). The default for whether static templates are generated. If 'false', they are not. A session-key in the .zap file can override this default. |
0 commit comments