elastic / elastic/package-spec
Document available handlebars helpers in `agent/spec.yml` file
- Dominant language
- Go
- Stars
- 20
- Forks
- 93
- Avg merge
- 15h 10m
- Merged PRs (30d)
- 12
Description
As called out in https://github.com/elastic/kibana/pull/135992#issuecomment-1181825725, we should include documentation for any available templating helpers in the `agent/spec.yml` file for each package type.
The available helpers today are
- `contains` - Utility for checking whether a list or string contains an item
- `escape_string` - Wraps a string in single quotes + escapes nested single quotes and newlines
- `to_json` - Runs a given value through `JSON.stringify` and returns the resulting string
See https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/services/epm/agent/agent.ts for the code where Fleet registers these helpers in its templating engine.
These spec docs should include a written description of each helper (see above) as well as example usage.
Contributor guide
Assessment
This issue has not been assessed yet.