Merge pull request #8420 from zmstone/0705-refactor-delete-unused-module
chore: delete unused schema module
This commit is contained in:
commit
9408aeb719
|
@ -181,11 +181,15 @@ start_app(App, Handler) ->
|
|||
app_conf_file(emqx_conf) -> "emqx.conf.all";
|
||||
app_conf_file(App) -> atom_to_list(App) ++ ".conf".
|
||||
|
||||
%% TODO: get rid of cuttlefish
|
||||
app_schema(App) ->
|
||||
Mod = list_to_atom(atom_to_list(App) ++ "_schema"),
|
||||
try
|
||||
true = is_list(Mod:roots()),
|
||||
Mod.
|
||||
Mod
|
||||
catch
|
||||
error:undef ->
|
||||
no_schema
|
||||
end.
|
||||
|
||||
mustache_vars(App) ->
|
||||
[
|
||||
|
@ -221,6 +225,8 @@ render_config_file(ConfigFile, Vars0) ->
|
|||
ok = file:write_file(NewName, Targ),
|
||||
NewName.
|
||||
|
||||
read_schema_configs(no_schema, _ConfigFile) ->
|
||||
ok;
|
||||
read_schema_configs(Schema, ConfigFile) ->
|
||||
NewConfig = generate_config(Schema, ConfigFile),
|
||||
lists:foreach(
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2020-2022 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%
|
||||
%% Licensed under the Apache License, Version 2.0 (the "License");
|
||||
%% you may not use this file except in compliance with the License.
|
||||
%% You may obtain a copy of the License at
|
||||
%%
|
||||
%% http://www.apache.org/licenses/LICENSE-2.0
|
||||
%%
|
||||
%% Unless required by applicable law or agreed to in writing, software
|
||||
%% distributed under the License is distributed on an "AS IS" BASIS,
|
||||
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
%% See the License for the specific language governing permissions and
|
||||
%% limitations under the License.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_management_schema).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
|
||||
-behaviour(hocon_schema).
|
||||
|
||||
-export([
|
||||
namespace/0,
|
||||
roots/0,
|
||||
fields/1
|
||||
]).
|
||||
|
||||
namespace() -> management.
|
||||
|
||||
roots() -> [].
|
||||
|
||||
fields(_) -> [].
|
Loading…
Reference in New Issue