some changes

This commit is contained in:
Alex S 2019-08-30 19:14:01 +03:00
commit 6721301086
5 changed files with 44 additions and 26 deletions

View file

@ -1,5 +1,7 @@
defmodule Pleroma.Docs.JSON do
@behaviour Pleroma.Docs.Formatter
@behaviour Pleroma.Docs.Generator
@spec process(keyword()) :: {:ok, String.t()}
def process(descriptions) do
config_path = "docs/generate_config.json"
{:ok, file} = File.open(config_path, [:write])
@ -9,6 +11,7 @@ defmodule Pleroma.Docs.JSON do
{:ok, config_path}
end
@spec generate_json([keyword()]) :: String.t()
def generate_json(descriptions) do
Jason.encode!(descriptions)
end