fix(gcp_pubsub_producer): mark `local_topic` as hidden in action schema

This commit is contained in:
Thales Macedo Garitezi 2023-12-15 15:08:51 -03:00
parent a5978aa39a
commit 6a5fdd4b55
1 changed files with 12 additions and 3 deletions

View File

@ -59,9 +59,18 @@ fields(producer_action) ->
)
);
fields(action_parameters) ->
UnsupportedFields = [local_topic],
lists:filter(
fun({Key, _Schema}) -> not lists:member(Key, UnsupportedFields) end,
lists:map(
fun
({local_topic, Sc}) ->
Override = #{
%% to please dialyzer...
type => hocon_schema:field_schema(Sc, type),
importance => ?IMPORTANCE_HIDDEN
},
{local_topic, hocon_schema:override(Sc, Override)};
(Field) ->
Field
end,
emqx_bridge_gcp_pubsub:fields(producer)
);
%%=========================================