Merge pull request #8140 from ieQu1/fix-dashboard-typerefl
fix(dashboard): Fix typing error
This commit is contained in:
commit
b3103a8701
|
@ -563,7 +563,7 @@ hocon_schema_to_spec(?R_REF(Module, StructName), _LocalModule) ->
|
||||||
hocon_schema_to_spec(?REF(StructName), LocalModule) ->
|
hocon_schema_to_spec(?REF(StructName), LocalModule) ->
|
||||||
{#{<<"$ref">> => ?TO_COMPONENTS_SCHEMA(LocalModule, StructName)}, [{LocalModule, StructName}]};
|
{#{<<"$ref">> => ?TO_COMPONENTS_SCHEMA(LocalModule, StructName)}, [{LocalModule, StructName}]};
|
||||||
hocon_schema_to_spec(Type, LocalModule) when ?IS_TYPEREFL(Type) ->
|
hocon_schema_to_spec(Type, LocalModule) when ?IS_TYPEREFL(Type) ->
|
||||||
{typename_to_spec(typerefl:name(Type), LocalModule), []};
|
{typename_to_spec(lists:flatten(typerefl:name(Type)), LocalModule), []};
|
||||||
hocon_schema_to_spec(?ARRAY(Item), LocalModule) ->
|
hocon_schema_to_spec(?ARRAY(Item), LocalModule) ->
|
||||||
{Schema, Refs} = hocon_schema_to_spec(Item, LocalModule),
|
{Schema, Refs} = hocon_schema_to_spec(Item, LocalModule),
|
||||||
{#{type => array, items => Schema}, Refs};
|
{#{type => array, items => Schema}, Refs};
|
||||||
|
|
|
@ -73,6 +73,9 @@ all() -> emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
emqx_common_test_helpers:boot_modules(all),
|
emqx_common_test_helpers:boot_modules(all),
|
||||||
|
ok = emqx_common_test_helpers:load_config(emqx_modules_schema, #{}, #{
|
||||||
|
raw_with_default => true
|
||||||
|
}),
|
||||||
emqx_common_test_helpers:start_apps([emqx_conf, emqx_modules]),
|
emqx_common_test_helpers:start_apps([emqx_conf, emqx_modules]),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,10 @@ all() -> emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
emqx_common_test_helpers:boot_modules(all),
|
emqx_common_test_helpers:boot_modules(all),
|
||||||
emqx_common_test_helpers:start_apps([emqx_conf, emqx_modules]),
|
|
||||||
ok = emqx_common_test_helpers:load_config(emqx_modules_schema, jsx:encode(?TOPIC), #{
|
ok = emqx_common_test_helpers:load_config(emqx_modules_schema, jsx:encode(?TOPIC), #{
|
||||||
raw_with_default => true
|
raw_with_default => true
|
||||||
}),
|
}),
|
||||||
|
emqx_common_test_helpers:start_apps([emqx_conf, emqx_modules]),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(_Config) ->
|
||||||
|
|
Loading…
Reference in New Issue