Merge branch 'feature/remove-settings-that-shouldnt-be-altered' into 'develop'
[akkoma] / lib / pleroma / web / api_spec / operations / subscription_operation.ex
index 663b8fa1159850b525090b6ebbaeae140da4f132..cf6dcb06850d04a2712a8c5afb808e87bf7a0993 100644 (file)
@@ -109,19 +109,38 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
           required: [:endpoint, :keys]
         },
         data: %Schema{
+          nullable: true,
           type: :object,
           properties: %{
             alerts: %Schema{
+              nullable: true,
               type: :object,
               properties: %{
-                follow: %Schema{type: :boolean, description: "Receive follow notifications?"},
+                follow: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive follow notifications?"
+                },
                 favourite: %Schema{
                   type: :boolean,
+                  nullable: true,
                   description: "Receive favourite notifications?"
                 },
-                reblog: %Schema{type: :boolean, description: "Receive reblog notifications?"},
-                mention: %Schema{type: :boolean, description: "Receive mention notifications?"},
-                poll: %Schema{type: :boolean, description: "Receive poll notifications?"}
+                reblog: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive reblog notifications?"
+                },
+                mention: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive mention notifications?"
+                },
+                poll: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive poll notifications?"
+                }
               }
             }
           }
@@ -154,19 +173,38 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
       type: :object,
       properties: %{
         data: %Schema{
+          nullable: true,
           type: :object,
           properties: %{
             alerts: %Schema{
+              nullable: true,
               type: :object,
               properties: %{
-                follow: %Schema{type: :boolean, description: "Receive follow notifications?"},
+                follow: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive follow notifications?"
+                },
                 favourite: %Schema{
                   type: :boolean,
+                  nullable: true,
                   description: "Receive favourite notifications?"
                 },
-                reblog: %Schema{type: :boolean, description: "Receive reblog notifications?"},
-                mention: %Schema{type: :boolean, description: "Receive mention notifications?"},
-                poll: %Schema{type: :boolean, description: "Receive poll notifications?"}
+                reblog: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive reblog notifications?"
+                },
+                mention: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive mention notifications?"
+                },
+                poll: %Schema{
+                  type: :boolean,
+                  nullable: true,
+                  description: "Receive poll notifications?"
+                }
               }
             }
           }