diff options
| author | feld <feld@feld.me> | 2024-06-07 20:42:50 +0000 | 
|---|---|---|
| committer | feld <feld@feld.me> | 2024-06-07 20:42:50 +0000 | 
| commit | a4bd89c77e668ac3c17289c3ee9b8574efe47072 (patch) | |
| tree | 860d766eadff8e1836d939d47db12163652d122f | |
| parent | f44987bd0f2a855e5fcb78647426ceb552e584fc (diff) | |
| parent | b52d772a6e66b13bac875b7289de3bd63c087db3 (diff) | |
| download | pleroma-a4bd89c77e668ac3c17289c3ee9b8574efe47072.tar.gz pleroma-a4bd89c77e668ac3c17289c3ee9b8574efe47072.zip  | |
Merge branch 'spex/notification-types' into 'develop'
Spex: Add missing notification types to the api spec
See merge request pleroma/pleroma!4141
| -rw-r--r-- | changelog.d/notification-spex.skip | 0 | ||||
| -rw-r--r-- | lib/pleroma/web/api_spec/cast_and_validate.ex | 6 | ||||
| -rw-r--r-- | lib/pleroma/web/api_spec/operations/notification_operation.ex | 8 | 
3 files changed, 13 insertions, 1 deletions
diff --git a/changelog.d/notification-spex.skip b/changelog.d/notification-spex.skip new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/changelog.d/notification-spex.skip diff --git a/lib/pleroma/web/api_spec/cast_and_validate.ex b/lib/pleroma/web/api_spec/cast_and_validate.ex index f3e8e093e..eb487fce7 100644 --- a/lib/pleroma/web/api_spec/cast_and_validate.ex +++ b/lib/pleroma/web/api_spec/cast_and_validate.ex @@ -18,6 +18,8 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do    alias OpenApiSpex.Plug.PutApiSpec    alias Plug.Conn +  require Logger +    @impl Plug    def init(opts) do      opts @@ -51,6 +53,10 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do          conn        {:error, reason} -> +        Logger.error( +          "Strict ApiSpec: request denied to #{conn.path_info} with params #{inspect(conn.params)}" +        ) +          opts = render_error.init(reason)          conn diff --git a/lib/pleroma/web/api_spec/operations/notification_operation.ex b/lib/pleroma/web/api_spec/operations/notification_operation.ex index a79eb8f74..2dc0f66df 100644 --- a/lib/pleroma/web/api_spec/operations/notification_operation.ex +++ b/lib/pleroma/web/api_spec/operations/notification_operation.ex @@ -203,7 +203,10 @@ defmodule Pleroma.Web.ApiSpec.NotificationOperation do          "move",          "follow_request",          "poll", -        "status" +        "status", +        "update", +        "admin.sign_up", +        "admin.report"        ],        description: """        The type of event that resulted in the notification. @@ -218,6 +221,9 @@ defmodule Pleroma.Web.ApiSpec.NotificationOperation do        - `pleroma:chat_mention` - Someone mentioned you in a chat message        - `pleroma:report` - Someone was reported        - `status` - Someone you are subscribed to created a status +      - `update` - A status you boosted has been edited +      - `admin.sign_up` - Someone signed up (optionally sent to admins) +      - `admin.report` - A new report has been filed        """      }    end  | 
