Open kpollich opened 2 years ago
++ on adding these docs. Lets make sure we find a way that these docs are easy accessible to every engineer building integrations without having to read docs inside a yaml file. Of course, the spec file should be source of truth.
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 itemescape_string
- Wraps a string in single quotes + escapes nested single quotes and newlinesto_json
- Runs a given value throughJSON.stringify
and returns the resulting stringSee 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.