Merge pull request #12186 from thalesmg/gcp-pubsub-local-topic-action-r54-20231215

fix(gcp_pubsub_producer): mark `local_topic` as hidden in action schema
This commit is contained in:
Thales Macedo Garitezi 2023-12-18 11:34:19 -03:00 committed by GitHub
commit 2d11aca39f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -59,9 +59,18 @@ fields(producer_action) ->
) )
); );
fields(action_parameters) -> fields(action_parameters) ->
UnsupportedFields = [local_topic], lists:map(
lists:filter( fun
fun({Key, _Schema}) -> not lists:member(Key, UnsupportedFields) end, ({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) emqx_bridge_gcp_pubsub:fields(producer)
); );
%%========================================= %%=========================================