소스 검색

fix: topic_metrics example

JimMoen 4 년 전
부모
커밋
d82a5544da
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      apps/emqx_modules/src/emqx_topic_metrics_api.erl

+ 3 - 5
apps/emqx_modules/src/emqx_topic_metrics_api.erl

@@ -231,18 +231,16 @@ fields(metrics) ->
 topic(In) ->
     case In of
         body ->
-            Desc = <<"Raw topic string">>,
-            Example = "testtopic/1";
+            Desc = <<"Raw topic string">>;
         path ->
-            Desc = <<"Notice: Topic string in url path must be encoded">>,
-            Example = "testtopic%2F1"
+            Desc = <<"Notice: Topic string in url path must be encoded">>
     end,
     { topic
     , mk( binary(),
           #{ desc => Desc
            , required => true
            , in => In
-           , example => Example
+           , example => <<"testtopic/1">>
            })
     }.