test(bridge): fix bridge map type filed converters
now the converters on map type fields only work at the wrapping map level but not the values
This commit is contained in:
parent
03ae61569f
commit
57cc854a4a
|
@ -230,7 +230,12 @@ webhook_bridge_converter(Conf0, _HoconOpts) ->
|
|||
undefined ->
|
||||
undefined;
|
||||
_ ->
|
||||
do_convert_webhook_config(Conf1)
|
||||
maps:map(
|
||||
fun(_Name, Conf) ->
|
||||
do_convert_webhook_config(Conf)
|
||||
end,
|
||||
Conf1
|
||||
)
|
||||
end.
|
||||
|
||||
do_convert_webhook_config(
|
||||
|
|
|
@ -181,7 +181,7 @@ kafka_structs() ->
|
|||
#{
|
||||
desc => <<"Kafka Producer Bridge Config">>,
|
||||
required => false,
|
||||
converter => fun emqx_bridge_kafka:kafka_producer_converter/2
|
||||
converter => fun kafka_producer_converter/2
|
||||
}
|
||||
)},
|
||||
{kafka_consumer,
|
||||
|
@ -264,3 +264,13 @@ sqlserver_structs() ->
|
|||
}
|
||||
)}
|
||||
].
|
||||
|
||||
kafka_producer_converter(undefined, _) ->
|
||||
undefined;
|
||||
kafka_producer_converter(Map, Opts) ->
|
||||
maps:map(
|
||||
fun(_Name, Config) ->
|
||||
emqx_bridge_kafka:kafka_producer_converter(Config, Opts)
|
||||
end,
|
||||
Map
|
||||
).
|
||||
|
|
Loading…
Reference in New Issue