summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2021-02-09 22:23:11 +0300
committerrinpatch <rinpatch@sdf.org>2021-02-09 22:23:11 +0300
commit0d9230aed9f492599ecb505375474578714a2ee8 (patch)
treee60c58710a9ac6791c721c25932d390b41b990c7
parentf13f5d9303d45093953a7c609a7b1f282a31e8da (diff)
OpenAPI spec: Do not show build enviroment in the spec version
-rw-r--r--lib/pleroma/web/api_spec.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/api_spec.ex b/lib/pleroma/web/api_spec.ex
index 81b7bc9e8..b16068f7b 100644
--- a/lib/pleroma/web/api_spec.ex
+++ b/lib/pleroma/web/api_spec.ex
@@ -37,7 +37,8 @@ defmodule Pleroma.Web.ApiSpec do
Please report such occurences on our [issue tracker](https://git.pleroma.social/pleroma/pleroma/-/issues). Feel free to submit API questions or proposals there too!
""",
- version: Application.spec(:pleroma, :vsn) |> to_string(),
+ # Strip environment from the version
+ version: Application.spec(:pleroma, :vsn) |> to_string() |> String.replace(~r/\+.*$/, ""),
extensions: %{
# Logo path should be picked so that the path exists both on Pleroma instances and on api.pleroma.social
"x-logo": %{"url" => "/static/logo.svg", "altText" => "Pleroma logo"}