2022-02-25 23:11:42 -07:00
|
|
|
# Pleroma: A lightweight social networking server
|
|
|
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
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
|