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