Update README.md with latest json schema (automated)
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
-vsn("0.6.1").
|
||||
|
||||
-export([ schema/0
|
||||
, to_json/0 ]).
|
||||
, to_json/0
|
||||
, export/1 ]).
|
||||
|
||||
-import(gmconfig_schema_helpers,
|
||||
[ str/1
|
||||
@@ -22,6 +23,17 @@
|
||||
to_json() ->
|
||||
json:encode(schema()).
|
||||
|
||||
export(ToFile) ->
|
||||
case file:open(ToFile, [write]) of
|
||||
{ok, Fd} ->
|
||||
try ok = io:put_chars(Fd, json:format(schema(), #{indent => 4}))
|
||||
after
|
||||
file:close(Fd)
|
||||
end;
|
||||
{error, _} = Error ->
|
||||
Error
|
||||
end.
|
||||
|
||||
schema() ->
|
||||
obj(schema_init(),
|
||||
#{
|
||||
|
||||
Reference in New Issue
Block a user