|
|
@@ -18,21 +18,6 @@
|
|
|
|
|
|
-export([check/2]).
|
|
|
|
|
|
--export([structs/0, fields/1]).
|
|
|
-
|
|
|
--behaviour(hocon_schema).
|
|
|
-
|
|
|
check(SchemaMod, Conf) ->
|
|
|
- _ = erlang:erase(res_schema_mod),
|
|
|
- erlang:put(res_schema_mod, SchemaMod),
|
|
|
- hocon_schema:check(?MODULE, Conf).
|
|
|
-
|
|
|
-structs() -> ["config"].
|
|
|
+ hocon_schema:check(SchemaMod, Conf, #{nullable => false}).
|
|
|
|
|
|
-fields("config") ->
|
|
|
- [fun(type) -> "schema";
|
|
|
- (_) -> undefined
|
|
|
- end];
|
|
|
-fields("schema") ->
|
|
|
- SchemaMod = erlang:get(res_schema_mod),
|
|
|
- SchemaMod:schema().
|