Skip to content

Commit b096ca5

Browse files
committed
feat: add init/0 callback to start jesse database and preload schemas
1 parent edc2b3c commit b096ca5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/nova_json_schemas.erl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
-behaviour(nova_plugin).
33

44
-export([
5+
init/0,
56
load_local_schemas/0,
67
pre_request/4,
78
post_request/4,
@@ -10,6 +11,11 @@
1011

1112
-include_lib("kernel/include/logger.hrl").
1213

14+
init() ->
15+
jesse_database:load_all(),
16+
load_local_schemas(),
17+
#{}.
18+
1319
%%--------------------------------------------------------------------
1420
%% @doc
1521
%% Load all local JSON schemas from the main application's

0 commit comments

Comments
 (0)