diff options
author | rinpatch <rinpatch@sdf.org> | 2020-05-15 11:13:08 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-05-15 11:13:08 +0000 |
commit | 081d1d3f48f2264ee329f7ff7af7c2f88fe0a654 (patch) | |
tree | cc123eb7495ddbd998ce3943fa5f4edb17b66a5b /lib/pleroma/web/api_spec/operations/subscription_operation.ex | |
parent | 907acbf62be2d0006baa6029ea453d363646a3bc (diff) | |
parent | e090191d03b21020a75c1ef91a200c3e4807c2d1 (diff) | |
download | pleroma-081d1d3f48f2264ee329f7ff7af7c2f88fe0a654.tar.gz |
Merge branch 'openapi/nullable-request-fields' into 'develop'
[OpenAPI] Mark all not required request fields as nullable
Closes #1761
See merge request pleroma/pleroma!2536
Diffstat (limited to 'lib/pleroma/web/api_spec/operations/subscription_operation.ex')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/subscription_operation.ex | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/lib/pleroma/web/api_spec/operations/subscription_operation.ex b/lib/pleroma/web/api_spec/operations/subscription_operation.ex index 663b8fa11..cf6dcb068 100644 --- a/lib/pleroma/web/api_spec/operations/subscription_operation.ex +++ b/lib/pleroma/web/api_spec/operations/subscription_operation.ex @@ -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?" + } } } } |