Dynamic_template causes MapperParsingException

I try to create a simple template, including some dynamic template, and I can't seem to index documents.

I get an MapperParsingException error:

It works fine if I remove the dynamic_templates part of the JSON.

What am I doing wrong?

Here is a reproduction of the code in python

This is the printout of the program:

200 {"acknowledged":true}
400 {"error":"MapperParsingException[mapping [default]]; nested: ClassCastException[java.util.LinkedHashMap cannot be cast to java.util.List]; ","status":400}