diff options
author | rinpatch <rinpatch@sdf.org> | 2021-02-03 15:14:40 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2021-02-03 15:14:40 +0000 |
commit | a7864a94295eedaee1c2ad0829c9b668c7acd705 (patch) | |
tree | 8a80f26c3ed94361ea4e2f28b35bfb25dc09a0ab | |
parent | d2acf3a92fd537708b1d1f7a78bb49686a76fec3 (diff) | |
parent | 74ef1a044d965cb20154c051d42fc183dc8ee0c2 (diff) | |
download | pleroma-a7864a94295eedaee1c2ad0829c9b668c7acd705.tar.gz |
Merge branch 'fix/openapi-relationship-nullable' into 'develop'
Account schema: specify that pleroma.relationship is nullable
See merge request pleroma/pleroma!3299
-rw-r--r-- | lib/pleroma/web/api_spec/helpers.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/account.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/account_relationship.ex | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/api_spec/helpers.ex b/lib/pleroma/web/api_spec/helpers.ex index 6babe0b28..6f67339e6 100644 --- a/lib/pleroma/web/api_spec/helpers.ex +++ b/lib/pleroma/web/api_spec/helpers.ex @@ -63,7 +63,7 @@ defmodule Pleroma.Web.ApiSpec.Helpers do :with_relationships, :query, BooleanLike, - "Embed relationships into accounts." + "Embed relationships into accounts. **If this parameter is not set account's `pleroma.relationship` is going to be `null`.**" ) end diff --git a/lib/pleroma/web/api_spec/schemas/account.ex b/lib/pleroma/web/api_spec/schemas/account.ex index 4f9b564d1..bd7143ab9 100644 --- a/lib/pleroma/web/api_spec/schemas/account.ex +++ b/lib/pleroma/web/api_spec/schemas/account.ex @@ -96,7 +96,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do hide_notification_contents: %Schema{type: :boolean} } }, - relationship: AccountRelationship, + relationship: %Schema{allOf: [AccountRelationship], nullable: true}, settings_store: %Schema{ type: :object, description: diff --git a/lib/pleroma/web/api_spec/schemas/account_relationship.ex b/lib/pleroma/web/api_spec/schemas/account_relationship.ex index 2cda19631..16b73ebb4 100644 --- a/lib/pleroma/web/api_spec/schemas/account_relationship.ex +++ b/lib/pleroma/web/api_spec/schemas/account_relationship.ex @@ -10,7 +10,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationship do OpenApiSpex.schema(%{ title: "AccountRelationship", - description: "Response schema for relationship", + description: "Relationship between current account and requested account", type: :object, properties: %{ blocked_by: %Schema{type: :boolean}, |