chore: remove obsolete workaround

This commit is contained in:
Thales Macedo Garitezi 2023-11-21 17:38:13 -03:00
parent 11ec1a30a0
commit 39791511fc
2 changed files with 4 additions and 12 deletions

View File

@ -615,14 +615,11 @@ producer_opts(ActionOrBridgeV1) ->
%% Hoever we need to keep it backward compatible for generated schema json (version 0.1.0)
%% since schema is data for the 'schemas' API.
parameters_field(ActionOrBridgeV1) ->
OverriddenV1 = <<"0.1.0">> =:= get(emqx_bridge_schema_version),
{Name, Alias} =
case {OverriddenV1, ActionOrBridgeV1} of
{true, _} ->
case ActionOrBridgeV1 of
v1 ->
{kafka, parameters};
{_, v1} ->
{kafka, parameters};
{_, action} ->
action ->
{parameters, kafka}
end,
{Name,

View File

@ -193,12 +193,7 @@ hotconf_schema_json() ->
bridge_schema_json() ->
Version = <<"0.1.0">>,
SchemaInfo = #{title => <<"EMQX Data Bridge API Schema">>, version => Version},
put(emqx_bridge_schema_version, Version),
try
gen_api_schema_json_iodata(emqx_bridge_api, SchemaInfo)
after
erase(emqx_bridge_schema_version)
end.
gen_api_schema_json_iodata(emqx_bridge_api, SchemaInfo).
%% TODO: remove it and also remove hocon_md.erl and friends.
%% markdown generation from schema is a failure and we are moving to an interactive