fix: make fields with index signatures a dynamic mapping

This commit is contained in:
Wieland Schöbl
2019-11-29 14:08:21 +01:00
parent 48dc47d70a
commit 8f5570e2e2

View File

@@ -222,6 +222,8 @@ function handleDeclarationReflection(decl: DeclarationReflection,
let empty = true;
// first check if there are any index signatures, so for example `[name: string]: Foo`
if (typeof decl.indexSignature !== 'undefined' && typeof decl.indexSignature.parameters !== 'undefined') {
out.dynamic = true;
for (const param of decl.indexSignature.parameters) {
empty = false;
const template: ElasticsearchDynamicTemplate = {};