Browse Source

fix(rules): make the 'name' field of POST /rules mandatory

Shawn 4 years atrás
parent
commit
9b4b3d2e8c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      apps/emqx_rule_engine/src/emqx_rule_engine_schema.erl

+ 1 - 0
apps/emqx_rule_engine/src/emqx_rule_engine_schema.erl

@@ -182,6 +182,7 @@ rule_name() ->
     {"name", sc(binary(),
         #{ desc => "The name of the rule"
          , default => ""
+         , nullable => false
          , example => "foo"
          })}.