refactor(schema): description use binary
This commit is contained in:
parent
ab94b49762
commit
f30c16e47c
|
@ -43,10 +43,16 @@ fields("delayed") ->
|
||||||
];
|
];
|
||||||
|
|
||||||
fields("rewrite") ->
|
fields("rewrite") ->
|
||||||
[ {action, sc(hoconsc:enum([subscribe, publish, all]), #{desc => "Action", example => publish})}
|
[ { action
|
||||||
, {source_topic, sc(binary(), #{desc => "Origin Topic", example => "x/#"})}
|
, sc( hoconsc:enum([subscribe, publish, all])
|
||||||
, {dest_topic, sc(binary(), #{desc => "Destination Topic", example => "z/y/$1"})}
|
, #{desc => <<"Action">>, example => publish})}
|
||||||
, {re, fun regular_expression/1 }
|
, { source_topic
|
||||||
|
, sc( binary()
|
||||||
|
, #{desc => <<"Origin Topic">>, example => "x/#"})}
|
||||||
|
, { dest_topic
|
||||||
|
, sc( binary()
|
||||||
|
, #{desc => <<"Destination Topic">>, example => "z/y/$1"})}
|
||||||
|
, { re, fun regular_expression/1 }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue