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