Browse Source

docs(schema): Add description for clientinfo_override

ieQu1 3 years ago
parent
commit
c0e5139e9f

+ 2 - 2
apps/emqx/etc/emqx.conf

@@ -894,7 +894,7 @@ conn_congestion {
   ## Whether to alarm the congested connections.
   ##
   ## Sometimes the mqtt connection (usually an MQTT subscriber) may
-  ## get "congested", because there're too many packets to be sent.
+  ## get "congested", because there's too many packets to sent.
   ## The socket tries to buffer the packets until the buffer is
   ## full. If more packets come after that, the packets will be
   ## "pending" in a queue and we consider the connection is
@@ -914,7 +914,7 @@ conn_congestion {
   enable_alarm = true
 
   ## Won't clear the congested alarm in how long time.
-  ## The alarm is cleared only when there're no pending bytes in
+  ## The alarm is cleared only when there's no pending bytes in
   ## the queue, and also it has been `min_alarm_sustain_duration`
   ## time since the last time we considered the connection is "congested".
   ##

+ 2 - 2
apps/emqx/src/emqx_schema.erl

@@ -304,7 +304,7 @@ fields("stats") ->
                 boolean(),
                 #{
                     default => true,
-                    desc => "Enable/disable statistic data collection"
+                    desc => "Enable/disable statistic data collection."
                 }
             )}
     ];
@@ -774,7 +774,7 @@ fields("conn_congestion") ->
                     default => "1m",
                     desc =>
                         "Minimal time before clearing the alarm.\n\n"
-                        "The alarm is cleared only when there're no pending data in\n"
+                        "The alarm is cleared only when there's no pending data in\n"
                         "the queue, and at least `min_alarm_sustain_duration`\n"
                         "milliseconds passed since the last time we considered the connection \"congested\".\n\n"
                         "This is to avoid clearing and raising the alarm again too often."

+ 3 - 1
apps/emqx_exhook/src/emqx_exhook_schema.erl

@@ -41,7 +41,9 @@ roots() -> [exhook].
 fields(exhook) ->
     [{servers,
       sc(hoconsc:array(ref(server)),
-          #{default => []})}
+          #{ default => []
+           , desc => "List of exhook servers."
+           })}
     ];
 
 fields(server) ->

+ 4 - 6
apps/emqx_gateway/src/emqx_gateway_schema.erl

@@ -318,9 +318,9 @@ fields(ssl_server_opts) ->
        }, true);
 
 fields(clientinfo_override) ->
-    [ {username, sc(binary())}
-    , {password, sc(binary())}
-    , {clientid, sc(binary())}
+    [ {username, sc(binary(), #{desc => "Template for overriding username."})}
+    , {password, sc(binary(), #{desc => "Template for overriding password."})}
+    , {clientid, sc(binary(), #{desc => "Template for overriding clientid."})}
     ];
 
 fields(lwm2m_translators) ->
@@ -524,9 +524,7 @@ It has two purposes:
            , desc => ""
            })}
     , {clientinfo_override,
-       sc(ref(clientinfo_override),
-          #{ desc => "ClientInfo override"
-           })}
+       sc(ref(clientinfo_override), #{})}
     , {?EMQX_AUTHENTICATION_CONFIG_ROOT_NAME_ATOM, authentication_schema()}
     ].