Merge branch 'spex/notification-types' into 'develop'
Spex: Add missing notification types to the api spec See merge request pleroma/pleroma!4141
This commit is contained in:
commit
a4bd89c77e
0
changelog.d/notification-spex.skip
Normal file
0
changelog.d/notification-spex.skip
Normal file
@ -18,6 +18,8 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do
|
|||||||
alias OpenApiSpex.Plug.PutApiSpec
|
alias OpenApiSpex.Plug.PutApiSpec
|
||||||
alias Plug.Conn
|
alias Plug.Conn
|
||||||
|
|
||||||
|
require Logger
|
||||||
|
|
||||||
@impl Plug
|
@impl Plug
|
||||||
def init(opts) do
|
def init(opts) do
|
||||||
opts
|
opts
|
||||||
@ -51,6 +53,10 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do
|
|||||||
conn
|
conn
|
||||||
|
|
||||||
{:error, reason} ->
|
{:error, reason} ->
|
||||||
|
Logger.error(
|
||||||
|
"Strict ApiSpec: request denied to #{conn.path_info} with params #{inspect(conn.params)}"
|
||||||
|
)
|
||||||
|
|
||||||
opts = render_error.init(reason)
|
opts = render_error.init(reason)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
@ -203,7 +203,10 @@ defmodule Pleroma.Web.ApiSpec.NotificationOperation do
|
|||||||
"move",
|
"move",
|
||||||
"follow_request",
|
"follow_request",
|
||||||
"poll",
|
"poll",
|
||||||
"status"
|
"status",
|
||||||
|
"update",
|
||||||
|
"admin.sign_up",
|
||||||
|
"admin.report"
|
||||||
],
|
],
|
||||||
description: """
|
description: """
|
||||||
The type of event that resulted in the notification.
|
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:chat_mention` - Someone mentioned you in a chat message
|
||||||
- `pleroma:report` - Someone was reported
|
- `pleroma:report` - Someone was reported
|
||||||
- `status` - Someone you are subscribed to created a status
|
- `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
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user