summaryrefslogtreecommitdiff
path: root/lib/mix
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2021-02-03 13:21:19 +0000
committerrinpatch <rinpatch@sdf.org>2021-02-03 13:21:19 +0000
commite2d7c4fd570cf3d4af649bc4a98c927b38088bc2 (patch)
treeef24b3ed13162302422a757061c9e7fafb9e036f /lib/mix
parentfd2477dfba1f167c7519a029bedd7ae6884a9f1d (diff)
parent9fcff7851f9b54d6baa14d87af3087ac3ce373dc (diff)
downloadpleroma-e2d7c4fd570cf3d4af649bc4a98c927b38088bc2.tar.gz
pleroma-e2d7c4fd570cf3d4af649bc4a98c927b38088bc2.zip
Merge branch 'feat/openapi-spec-export' into 'develop'
Improve OpenAPI spec and deploy it to api.pleroma.social See merge request pleroma/pleroma!3296
Diffstat (limited to 'lib/mix')
-rw-r--r--lib/mix/tasks/pleroma/openapi_spec.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/mix/tasks/pleroma/openapi_spec.ex b/lib/mix/tasks/pleroma/openapi_spec.ex
new file mode 100644
index 000000000..524bf5144
--- /dev/null
+++ b/lib/mix/tasks/pleroma/openapi_spec.ex
@@ -0,0 +1,6 @@
+defmodule Mix.Tasks.Pleroma.OpenapiSpec do
+ def run([path]) do
+ spec = Pleroma.Web.ApiSpec.spec(server_specific: false) |> Jason.encode!()
+ File.write(path, spec)
+ end
+end