Browse Source

Merge pull request #10588 from zhongwencool/fix-array-default

chore: make sure topic_metrics/rewrite's default is []
zhongwencool 2 years ago
parent
commit
2bc1ddbd19
1 changed files with 4 additions and 2 deletions
  1. 4 2
      apps/emqx_modules/src/emqx_modules_schema.erl

+ 4 - 2
apps/emqx_modules/src/emqx_modules_schema.erl

@@ -36,11 +36,13 @@ roots() ->
         "telemetry",
         "telemetry",
         array("rewrite", #{
         array("rewrite", #{
             desc => "List of topic rewrite rules.",
             desc => "List of topic rewrite rules.",
-            importance => ?IMPORTANCE_HIDDEN
+            importance => ?IMPORTANCE_HIDDEN,
+            default => []
         }),
         }),
         array("topic_metrics", #{
         array("topic_metrics", #{
             desc => "List of topics whose metrics are reported.",
             desc => "List of topics whose metrics are reported.",
-            importance => ?IMPORTANCE_HIDDEN
+            importance => ?IMPORTANCE_HIDDEN,
+            default => []
         })
         })
     ].
     ].