For template.json, the mappings object is left empty: {}. Likewise the properties object remains empty in the mapping.json example. This will be filled in automatically by the script.
However, using the example (given for --template-setting-legacy) for --template causes the ECS Tooling to error:
...
File "[...]/ecs/scripts/generators/es_template.py", line 263, in finalize_template
template['template']['mappings'] = mappings_section
KeyError: 'template'
Wrapping settings within a template element resolves the issue, since this would then be compliant with the standard index template schema.
If this behaviour is expected, perhaps the documentation just updating.
Within USAGE.md (line 402 - Mapping & Template Settings), it describes how to specify a template file:
However, using the example (given for
--template-setting-legacy
) for--template
causes the ECS Tooling to error:Wrapping
settings
within atemplate
element resolves the issue, since this would then be compliant with the standard index template schema.If this behaviour is expected, perhaps the documentation just updating.