chore: remove obsolete workaround
This commit is contained in:
parent
11ec1a30a0
commit
39791511fc
|
@ -615,14 +615,11 @@ producer_opts(ActionOrBridgeV1) ->
|
||||||
%% Hoever we need to keep it backward compatible for generated schema json (version 0.1.0)
|
%% Hoever we need to keep it backward compatible for generated schema json (version 0.1.0)
|
||||||
%% since schema is data for the 'schemas' API.
|
%% since schema is data for the 'schemas' API.
|
||||||
parameters_field(ActionOrBridgeV1) ->
|
parameters_field(ActionOrBridgeV1) ->
|
||||||
OverriddenV1 = <<"0.1.0">> =:= get(emqx_bridge_schema_version),
|
|
||||||
{Name, Alias} =
|
{Name, Alias} =
|
||||||
case {OverriddenV1, ActionOrBridgeV1} of
|
case ActionOrBridgeV1 of
|
||||||
{true, _} ->
|
v1 ->
|
||||||
{kafka, parameters};
|
{kafka, parameters};
|
||||||
{_, v1} ->
|
action ->
|
||||||
{kafka, parameters};
|
|
||||||
{_, action} ->
|
|
||||||
{parameters, kafka}
|
{parameters, kafka}
|
||||||
end,
|
end,
|
||||||
{Name,
|
{Name,
|
||||||
|
|
|
@ -193,12 +193,7 @@ hotconf_schema_json() ->
|
||||||
bridge_schema_json() ->
|
bridge_schema_json() ->
|
||||||
Version = <<"0.1.0">>,
|
Version = <<"0.1.0">>,
|
||||||
SchemaInfo = #{title => <<"EMQX Data Bridge API Schema">>, version => Version},
|
SchemaInfo = #{title => <<"EMQX Data Bridge API Schema">>, version => Version},
|
||||||
put(emqx_bridge_schema_version, Version),
|
gen_api_schema_json_iodata(emqx_bridge_api, SchemaInfo).
|
||||||
try
|
|
||||||
gen_api_schema_json_iodata(emqx_bridge_api, SchemaInfo)
|
|
||||||
after
|
|
||||||
erase(emqx_bridge_schema_version)
|
|
||||||
end.
|
|
||||||
|
|
||||||
%% TODO: remove it and also remove hocon_md.erl and friends.
|
%% 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
|
%% markdown generation from schema is a failure and we are moving to an interactive
|
||||||
|
|
Loading…
Reference in New Issue