2021-02-03 12:38:59 +00:00
|
|
|
defmodule Mix.Tasks.Pleroma.OpenapiSpec do
|
|
|
|
def run([path]) do
|
2021-02-09 19:10:09 +00:00
|
|
|
# Load Pleroma application to get version info
|
|
|
|
Application.load(:pleroma)
|
2021-02-03 12:38:59 +00:00
|
|
|
spec = Pleroma.Web.ApiSpec.spec(server_specific: false) |> Jason.encode!()
|
|
|
|
File.write(path, spec)
|
|
|
|
end
|
|
|
|
end
|