Skip to content

Split templates from scripts? #16314

@martijnvg

Description

@martijnvg

Templates exist to resolve placeholders in pieces of text and can only be used in indexed scripts and ingest. While scripts are used in many other places and exist to flexible execute custom logic related to the context it is running in.

Templates are integrated into the script infrastructure (mustache implements ScriptEngineService interface, Template extends from Script and all places that use templates are hardcoded to use mustache language). I think it makes sense to strip templates from the script infrastructure and let it be its own thing. For example Template should be not extend from Script, template implementations would implement TemplateEngineService and all of the template features would be accessible from a TemplateService.

The following is a list of tasks to work towards a separated TemplateService:

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions