Merge branch 'feature/1734-user-deletion' into 'develop'
[akkoma] / lib / pleroma / web / api_spec / operations / subscription_operation.ex
index cf6dcb06850d04a2712a8c5afb808e87bf7a0993..c575a87e622e78fc0125956d0abbba29cbc22d15 100644 (file)
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
   alias OpenApiSpex.Schema
   alias Pleroma.Web.ApiSpec.Helpers
   alias Pleroma.Web.ApiSpec.Schemas.ApiError
+  alias Pleroma.Web.ApiSpec.Schemas.BooleanLike
   alias Pleroma.Web.ApiSpec.Schemas.PushSubscription
 
   def open_api_operation(action) do
@@ -117,27 +118,27 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
               type: :object,
               properties: %{
                 follow: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive follow notifications?"
                 },
                 favourite: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive favourite notifications?"
                 },
                 reblog: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive reblog notifications?"
                 },
                 mention: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive mention notifications?"
                 },
                 poll: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive poll notifications?"
                 }
@@ -181,27 +182,27 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
               type: :object,
               properties: %{
                 follow: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive follow notifications?"
                 },
                 favourite: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive favourite notifications?"
                 },
                 reblog: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive reblog notifications?"
                 },
                 mention: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive mention notifications?"
                 },
                 poll: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive poll notifications?"
                 }