refactor(authn): root type as array of union
Deleted the wrapping union. i.e. previously it's union([union([...]), array(union([...]))]). not it's array(union([...])) It is after-all a lazy type, and the dynamic check allows single-elemented arrays not to have `[]` around it. the old union of array of union schema was just adding confusion
This commit is contained in:
parent
7d36079f0a
commit
41aa958ac9
|
@ -50,8 +50,7 @@ config_refs(Modules) ->
|
|||
%% in emqx_schema, 'authentication' is a map() type which is to allow
|
||||
%% EMQ X more plugable.
|
||||
root_type() ->
|
||||
T = authenticator_type(),
|
||||
hoconsc:union([T, hoconsc:array(T)]).
|
||||
hoconsc:array(authenticator_type()).
|
||||
|
||||
mechanism(Name) ->
|
||||
hoconsc:mk(hoconsc:enum([Name]),
|
||||
|
|
Loading…
Reference in New Issue