Improve OpenAPI schema
authorEgor Kislitsyn <egor@kislitsyn.com>
Tue, 21 Apr 2020 19:30:24 +0000 (23:30 +0400)
committerEgor Kislitsyn <egor@kislitsyn.com>
Tue, 21 Apr 2020 19:30:24 +0000 (23:30 +0400)
- Removes unneeded wrapping in examples
- Adds `:format` attributes

12 files changed:
lib/pleroma/web/api_spec/schemas/account.ex
lib/pleroma/web/api_spec/schemas/account_create_request.ex
lib/pleroma/web/api_spec/schemas/account_create_response.ex
lib/pleroma/web/api_spec/schemas/account_emoji.ex
lib/pleroma/web/api_spec/schemas/account_field.ex
lib/pleroma/web/api_spec/schemas/account_field_attribute.ex
lib/pleroma/web/api_spec/schemas/account_follows_request.ex
lib/pleroma/web/api_spec/schemas/account_relationship.ex
lib/pleroma/web/api_spec/schemas/app_create_request.ex
lib/pleroma/web/api_spec/schemas/app_create_response.ex
lib/pleroma/web/api_spec/schemas/list.ex
lib/pleroma/web/api_spec/schemas/status.ex

index beb0931824a027ce58ce07e81c875817954f4dfe..3634a7c766af12a4abf00af7e8d962560606bc30 100644 (file)
@@ -17,8 +17,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
     type: :object,
     properties: %{
       acct: %Schema{type: :string},
-      avatar_static: %Schema{type: :string},
-      avatar: %Schema{type: :string},
+      avatar_static: %Schema{type: :string, format: :uri},
+      avatar: %Schema{type: :string, format: :uri},
       bot: %Schema{type: :boolean},
       created_at: %Schema{type: :string, format: "date-time"},
       display_name: %Schema{type: :string},
@@ -27,13 +27,13 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
       follow_requests_count: %Schema{type: :integer},
       followers_count: %Schema{type: :integer},
       following_count: %Schema{type: :integer},
-      header_static: %Schema{type: :string},
-      header: %Schema{type: :string},
+      header_static: %Schema{type: :string, format: :uri},
+      header: %Schema{type: :string, format: :uri},
       id: %Schema{type: :string},
       locked: %Schema{type: :boolean},
-      note: %Schema{type: :string},
+      note: %Schema{type: :string, format: :html},
       statuses_count: %Schema{type: :integer},
-      url: %Schema{type: :string},
+      url: %Schema{type: :string, format: :uri},
       username: %Schema{type: :string},
       pleroma: %Schema{
         type: :object,
@@ -104,80 +104,78 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
       }
     },
     example: %{
-      "JSON" => %{
-        "acct" => "foobar",
-        "avatar" => "https://mypleroma.com/images/avi.png",
-        "avatar_static" => "https://mypleroma.com/images/avi.png",
-        "bot" => false,
-        "created_at" => "2020-03-24T13:05:58.000Z",
-        "display_name" => "foobar",
-        "emojis" => [],
+      "acct" => "foobar",
+      "avatar" => "https://mypleroma.com/images/avi.png",
+      "avatar_static" => "https://mypleroma.com/images/avi.png",
+      "bot" => false,
+      "created_at" => "2020-03-24T13:05:58.000Z",
+      "display_name" => "foobar",
+      "emojis" => [],
+      "fields" => [],
+      "follow_requests_count" => 0,
+      "followers_count" => 0,
+      "following_count" => 1,
+      "header" => "https://mypleroma.com/images/banner.png",
+      "header_static" => "https://mypleroma.com/images/banner.png",
+      "id" => "9tKi3esbG7OQgZ2920",
+      "locked" => false,
+      "note" => "cofe",
+      "pleroma" => %{
+        "allow_following_move" => true,
+        "background_image" => nil,
+        "confirmation_pending" => true,
+        "hide_favorites" => true,
+        "hide_followers" => false,
+        "hide_followers_count" => false,
+        "hide_follows" => false,
+        "hide_follows_count" => false,
+        "is_admin" => false,
+        "is_moderator" => false,
+        "skip_thread_containment" => false,
+        "chat_token" =>
+          "SFMyNTY.g3QAAAACZAAEZGF0YW0AAAASOXRLaTNlc2JHN09RZ1oyOTIwZAAGc2lnbmVkbgYARNplS3EB.Mb_Iaqew2bN1I1o79B_iP7encmVCpTKC4OtHZRxdjKc",
+        "unread_conversation_count" => 0,
+        "tags" => [],
+        "notification_settings" => %{
+          "followers" => true,
+          "follows" => true,
+          "non_followers" => true,
+          "non_follows" => true,
+          "privacy_option" => false
+        },
+        "relationship" => %{
+          "blocked_by" => false,
+          "blocking" => false,
+          "domain_blocking" => false,
+          "endorsed" => false,
+          "followed_by" => false,
+          "following" => false,
+          "id" => "9tKi3esbG7OQgZ2920",
+          "muting" => false,
+          "muting_notifications" => false,
+          "requested" => false,
+          "showing_reblogs" => true,
+          "subscribing" => false
+        },
+        "settings_store" => %{
+          "pleroma-fe" => %{}
+        }
+      },
+      "source" => %{
         "fields" => [],
-        "follow_requests_count" => 0,
-        "followers_count" => 0,
-        "following_count" => 1,
-        "header" => "https://mypleroma.com/images/banner.png",
-        "header_static" => "https://mypleroma.com/images/banner.png",
-        "id" => "9tKi3esbG7OQgZ2920",
-        "locked" => false,
-        "note" => "cofe",
+        "note" => "foobar",
         "pleroma" => %{
-          "allow_following_move" => true,
-          "background_image" => nil,
-          "confirmation_pending" => true,
-          "hide_favorites" => true,
-          "hide_followers" => false,
-          "hide_followers_count" => false,
-          "hide_follows" => false,
-          "hide_follows_count" => false,
-          "is_admin" => false,
-          "is_moderator" => false,
-          "skip_thread_containment" => false,
-          "chat_token" =>
-            "SFMyNTY.g3QAAAACZAAEZGF0YW0AAAASOXRLaTNlc2JHN09RZ1oyOTIwZAAGc2lnbmVkbgYARNplS3EB.Mb_Iaqew2bN1I1o79B_iP7encmVCpTKC4OtHZRxdjKc",
-          "unread_conversation_count" => 0,
-          "tags" => [],
-          "notification_settings" => %{
-            "followers" => true,
-            "follows" => true,
-            "non_followers" => true,
-            "non_follows" => true,
-            "privacy_option" => false
-          },
-          "relationship" => %{
-            "blocked_by" => false,
-            "blocking" => false,
-            "domain_blocking" => false,
-            "endorsed" => false,
-            "followed_by" => false,
-            "following" => false,
-            "id" => "9tKi3esbG7OQgZ2920",
-            "muting" => false,
-            "muting_notifications" => false,
-            "requested" => false,
-            "showing_reblogs" => true,
-            "subscribing" => false
-          },
-          "settings_store" => %{
-            "pleroma-fe" => %{}
-          }
-        },
-        "source" => %{
-          "fields" => [],
-          "note" => "foobar",
-          "pleroma" => %{
-            "actor_type" => "Person",
-            "discoverable" => false,
-            "no_rich_text" => false,
-            "show_role" => true
-          },
-          "privacy" => "public",
-          "sensitive" => false
+          "actor_type" => "Person",
+          "discoverable" => false,
+          "no_rich_text" => false,
+          "show_role" => true
         },
-        "statuses_count" => 0,
-        "url" => "https://mypleroma.com/users/foobar",
-        "username" => "foobar"
-      }
+        "privacy" => "public",
+        "sensitive" => false
+      },
+      "statuses_count" => 0,
+      "url" => "https://mypleroma.com/users/foobar",
+      "username" => "foobar"
     }
   })
 end
index 398e2d6132bd01e7dfab28120ee871c32ac2a2fc..49fa121592b72c76b91e298dcc79fb60cbe6b510 100644 (file)
@@ -23,7 +23,11 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountCreateRequest do
           "The email address to be used for login. Required when `account_activation_required` is enabled.",
         format: :email
       },
-      password: %Schema{type: :string, description: "The password to be used for login"},
+      password: %Schema{
+        type: :string,
+        description: "The password to be used for login",
+        format: :password
+      },
       agreement: %Schema{
         type: :boolean,
         description:
index f41a034c0f7482fd6a0012a6669b617514bd059e..2237351a2914953760058ccc7e7ac0e4d5de63b5 100644 (file)
@@ -15,15 +15,13 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountCreateResponse do
       token_type: %Schema{type: :string},
       access_token: %Schema{type: :string},
       scope: %Schema{type: :array, items: %Schema{type: :string}},
-      created_at: %Schema{type: :integer}
+      created_at: %Schema{type: :integer, format: :"date-time"}
     },
     example: %{
-      "JSON" => %{
-        "access_token" => "i9hAVVzGld86Pl5JtLtizKoXVvtTlSCJvwaugCxvZzk",
-        "created_at" => 1_585_918_714,
-        "scope" => ["read", "write", "follow", "push"],
-        "token_type" => "Bearer"
-      }
+      "access_token" => "i9hAVVzGld86Pl5JtLtizKoXVvtTlSCJvwaugCxvZzk",
+      "created_at" => 1_585_918_714,
+      "scope" => ["read", "write", "follow", "push"],
+      "token_type" => "Bearer"
     }
   })
 end
index 403b13b15b7d68ae6bee2e163c46b0af631b3a2a..6c1d4d95c5c6473653cf091b11cfaad2bb9ff54e 100644 (file)
@@ -13,19 +13,17 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountEmoji do
     type: :object,
     properties: %{
       shortcode: %Schema{type: :string},
-      url: %Schema{type: :string},
-      static_url: %Schema{type: :string},
+      url: %Schema{type: :string, format: :uri},
+      static_url: %Schema{type: :string, format: :uri},
       visible_in_picker: %Schema{type: :boolean}
     },
     example: %{
-      "JSON" => %{
-        "shortcode" => "fatyoshi",
-        "url" =>
-          "https://files.mastodon.social/custom_emojis/images/000/023/920/original/e57ecb623faa0dc9.png",
-        "static_url" =>
-          "https://files.mastodon.social/custom_emojis/images/000/023/920/static/e57ecb623faa0dc9.png",
-        "visible_in_picker" => true
-      }
+      "shortcode" => "fatyoshi",
+      "url" =>
+        "https://files.mastodon.social/custom_emojis/images/000/023/920/original/e57ecb623faa0dc9.png",
+      "static_url" =>
+        "https://files.mastodon.social/custom_emojis/images/000/023/920/static/e57ecb623faa0dc9.png",
+      "visible_in_picker" => true
     }
   })
 end
index 8906d812de09e14307facf0bd91db5f5d96938f3..fa97073a0e5d7523d950f4198046de2b99c47750 100644 (file)
@@ -13,16 +13,14 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountField do
     type: :object,
     properties: %{
       name: %Schema{type: :string},
-      value: %Schema{type: :string},
-      verified_at: %Schema{type: :string, format: "date-time", nullable: true}
+      value: %Schema{type: :string, format: :html},
+      verified_at: %Schema{type: :string, format: :"date-time", nullable: true}
     },
     example: %{
-      "JSON" => %{
-        "name" => "Website",
-        "value" =>
-          "<a href=\"https://pleroma.com\" rel=\"me nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"\">pleroma.com</span><span class=\"invisible\"></span></a>",
-        "verified_at" => "2019-08-29T04:14:55.571+00:00"
-      }
+      "name" => "Website",
+      "value" =>
+        "<a href=\"https://pleroma.com\" rel=\"me nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"\">pleroma.com</span><span class=\"invisible\"></span></a>",
+      "verified_at" => "2019-08-29T04:14:55.571+00:00"
     }
   })
 end
index fbbdf95f53448fb9cd081b269b045d2acb27b694..89e483655c2cfaecfccd0224d415c67d5ede34cd 100644 (file)
@@ -17,10 +17,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountAttributeField do
     },
     required: [:name, :value],
     example: %{
-      "JSON" => %{
-        "name" => "Website",
-        "value" => "https://pleroma.com"
-      }
+      "name" => "Website",
+      "value" => "https://pleroma.com"
     }
   })
 end
index 4fbe615d6300370842f7e9406e55e1e03c55bebe..19dce0cb2e3cfa115adaf8367c0008cb2dbb46f8 100644 (file)
@@ -11,7 +11,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountFollowsRequest do
     description: "POST body for muting an account",
     type: :object,
     properties: %{
-      uri: %Schema{type: :string}
+      uri: %Schema{type: :string, format: :uri}
     },
     required: [:uri]
   })
index 7db3b49bb4a853d89436acd3fc3c402bb061faf0..f2bd37d399a1bf5bb30eb237889134b3fe6227d9 100644 (file)
@@ -26,20 +26,18 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AccountRelationship do
       subscribing: %Schema{type: :boolean}
     },
     example: %{
-      "JSON" => %{
-        "blocked_by" => false,
-        "blocking" => false,
-        "domain_blocking" => false,
-        "endorsed" => false,
-        "followed_by" => false,
-        "following" => false,
-        "id" => "9tKi3esbG7OQgZ2920",
-        "muting" => false,
-        "muting_notifications" => false,
-        "requested" => false,
-        "showing_reblogs" => true,
-        "subscribing" => false
-      }
+      "blocked_by" => false,
+      "blocking" => false,
+      "domain_blocking" => false,
+      "endorsed" => false,
+      "followed_by" => false,
+      "following" => false,
+      "id" => "9tKi3esbG7OQgZ2920",
+      "muting" => false,
+      "muting_notifications" => false,
+      "requested" => false,
+      "showing_reblogs" => true,
+      "subscribing" => false
     }
   })
 end
index 8a83abef3eb1f4e5771c01235eec32eb14cbffac..7e92205cfdd496f170d2f822f76bf7759fe3fdee 100644 (file)
@@ -21,7 +21,11 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AppCreateRequest do
         type: :string,
         description: "Space separated list of scopes. If none is provided, defaults to `read`."
       },
-      website: %Schema{type: :string, description: "A URL to the homepage of your app"}
+      website: %Schema{
+        type: :string,
+        description: "A URL to the homepage of your app",
+        format: :uri
+      }
     },
     required: [:client_name, :redirect_uris],
     example: %{
index f290fb031792e3cc0c5b9b13d66fddacc93be9e3..3c41d4ee5cc2f71aac3f3a45a726dc6c2de0d8cb 100644 (file)
@@ -16,9 +16,9 @@ defmodule Pleroma.Web.ApiSpec.Schemas.AppCreateResponse do
       name: %Schema{type: :string},
       client_id: %Schema{type: :string},
       client_secret: %Schema{type: :string},
-      redirect_uri: %Schema{type: :string},
+      redirect_uri: %Schema{type: :string, format: :uri},
       vapid_key: %Schema{type: :string},
-      website: %Schema{type: :string, nullable: true}
+      website: %Schema{type: :string, nullable: true, format: :uri}
     },
     example: %{
       "id" => "123",
index 30fa7db936e2463ae4f3a7e8ab6ad899d19319be..f85fac2b854df866aa4900bed25caa4f53254661 100644 (file)
@@ -16,10 +16,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.List do
       title: %Schema{type: :string}
     },
     example: %{
-      "JSON" => %{
-        "id" => "123",
-        "title" => "my list"
-      }
+      "id" => "123",
+      "title" => "my list"
     }
   })
 end
index 486c3a0fe2130b9947db4e0aea988b996f469827..a022450e626c69b9e33d91c7bb120541ee98a11d 100644 (file)
@@ -21,7 +21,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
         type: :object,
         properties: %{
           name: %Schema{type: :string},
-          website: %Schema{type: :string, nullable: true}
+          website: %Schema{type: :string, nullable: true, format: :uri}
         }
       },
       bookmarked: %Schema{type: :boolean},
@@ -29,16 +29,16 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
         type: :object,
         nullable: true,
         properties: %{
-          type: %Schema{type: :string},
-          provider_name: %Schema{type: :string},
-          provider_url: %Schema{type: :string},
-          url: %Schema{type: :string},
-          image: %Schema{type: :string},
+          type: %Schema{type: :string, enum: ["link", "photo", "video", "rich"]},
+          provider_name: %Schema{type: :string, nullable: true},
+          provider_url: %Schema{type: :string, format: :uri},
+          url: %Schema{type: :string, format: :uri},
+          image: %Schema{type: :string, nullable: true, format: :uri},
           title: %Schema{type: :string},
           description: %Schema{type: :string}
         }
       },
-      content: %Schema{type: :string},
+      content: %Schema{type: :string, format: :html},
       created_at: %Schema{type: :string, format: "date-time"},
       emojis: %Schema{type: :array, items: AccountEmoji},
       favourited: %Schema{type: :boolean},
@@ -53,10 +53,10 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
           type: :object,
           properties: %{
             id: %Schema{type: :string},
-            url: %Schema{type: :string},
-            remote_url: %Schema{type: :string},
-            preview_url: %Schema{type: :string},
-            text_url: %Schema{type: :string},
+            url: %Schema{type: :string, format: :uri},
+            remote_url: %Schema{type: :string, format: :uri},
+            preview_url: %Schema{type: :string, format: :uri},
+            text_url: %Schema{type: :string, format: :uri},
             description: %Schema{type: :string},
             type: %Schema{type: :string, enum: ["image", "video", "audio", "unknown"]},
             pleroma: %Schema{
@@ -74,7 +74,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
             id: %Schema{type: :string},
             acct: %Schema{type: :string},
             username: %Schema{type: :string},
-            url: %Schema{type: :string}
+            url: %Schema{type: :string, format: :uri}
           }
         }
       },
@@ -120,108 +120,106 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
           type: :object,
           properties: %{
             name: %Schema{type: :string},
-            url: %Schema{type: :string}
+            url: %Schema{type: :string, format: :uri}
           }
         }
       },
-      uri: %Schema{type: :string},
-      url: %Schema{type: :string},
+      uri: %Schema{type: :string, format: :uri},
+      url: %Schema{type: :string, nullable: true, format: :uri},
       visibility: VisibilityScope
     },
     example: %{
-      "JSON" => %{
-        "account" => %{
-          "acct" => "nick6",
-          "avatar" => "http://localhost:4001/images/avi.png",
-          "avatar_static" => "http://localhost:4001/images/avi.png",
-          "bot" => false,
-          "created_at" => "2020-04-07T19:48:51.000Z",
-          "display_name" => "Test テスト User 6",
-          "emojis" => [],
-          "fields" => [],
-          "followers_count" => 1,
-          "following_count" => 0,
-          "header" => "http://localhost:4001/images/banner.png",
-          "header_static" => "http://localhost:4001/images/banner.png",
-          "id" => "9toJCsKN7SmSf3aj5c",
-          "locked" => false,
-          "note" => "Tester Number 6",
-          "pleroma" => %{
-            "background_image" => nil,
-            "confirmation_pending" => false,
-            "hide_favorites" => true,
-            "hide_followers" => false,
-            "hide_followers_count" => false,
-            "hide_follows" => false,
-            "hide_follows_count" => false,
-            "is_admin" => false,
-            "is_moderator" => false,
-            "relationship" => %{
-              "blocked_by" => false,
-              "blocking" => false,
-              "domain_blocking" => false,
-              "endorsed" => false,
-              "followed_by" => false,
-              "following" => true,
-              "id" => "9toJCsKN7SmSf3aj5c",
-              "muting" => false,
-              "muting_notifications" => false,
-              "requested" => false,
-              "showing_reblogs" => true,
-              "subscribing" => false
-            },
-            "skip_thread_containment" => false,
-            "tags" => []
-          },
-          "source" => %{
-            "fields" => [],
-            "note" => "Tester Number 6",
-            "pleroma" => %{"actor_type" => "Person", "discoverable" => false},
-            "sensitive" => false
-          },
-          "statuses_count" => 1,
-          "url" => "http://localhost:4001/users/nick6",
-          "username" => "nick6"
-        },
-        "application" => %{"name" => "Web", "website" => nil},
-        "bookmarked" => false,
-        "card" => nil,
-        "content" => "foobar",
+      "account" => %{
+        "acct" => "nick6",
+        "avatar" => "http://localhost:4001/images/avi.png",
+        "avatar_static" => "http://localhost:4001/images/avi.png",
+        "bot" => false,
         "created_at" => "2020-04-07T19:48:51.000Z",
+        "display_name" => "Test テスト User 6",
         "emojis" => [],
-        "favourited" => false,
-        "favourites_count" => 0,
-        "id" => "9toJCu5YZW7O7gfvH6",
-        "in_reply_to_account_id" => nil,
-        "in_reply_to_id" => nil,
-        "language" => nil,
-        "media_attachments" => [],
-        "mentions" => [],
-        "muted" => false,
-        "pinned" => false,
+        "fields" => [],
+        "followers_count" => 1,
+        "following_count" => 0,
+        "header" => "http://localhost:4001/images/banner.png",
+        "header_static" => "http://localhost:4001/images/banner.png",
+        "id" => "9toJCsKN7SmSf3aj5c",
+        "locked" => false,
+        "note" => "Tester Number 6",
         "pleroma" => %{
-          "content" => %{"text/plain" => "foobar"},
-          "conversation_id" => 345_972,
-          "direct_conversation_id" => nil,
-          "emoji_reactions" => [],
-          "expires_at" => nil,
-          "in_reply_to_account_acct" => nil,
-          "local" => true,
-          "spoiler_text" => %{"text/plain" => ""},
-          "thread_muted" => false
+          "background_image" => nil,
+          "confirmation_pending" => false,
+          "hide_favorites" => true,
+          "hide_followers" => false,
+          "hide_followers_count" => false,
+          "hide_follows" => false,
+          "hide_follows_count" => false,
+          "is_admin" => false,
+          "is_moderator" => false,
+          "relationship" => %{
+            "blocked_by" => false,
+            "blocking" => false,
+            "domain_blocking" => false,
+            "endorsed" => false,
+            "followed_by" => false,
+            "following" => true,
+            "id" => "9toJCsKN7SmSf3aj5c",
+            "muting" => false,
+            "muting_notifications" => false,
+            "requested" => false,
+            "showing_reblogs" => true,
+            "subscribing" => false
+          },
+          "skip_thread_containment" => false,
+          "tags" => []
         },
-        "poll" => nil,
-        "reblog" => nil,
-        "reblogged" => false,
-        "reblogs_count" => 0,
-        "replies_count" => 0,
-        "sensitive" => false,
-        "spoiler_text" => "",
-        "tags" => [],
-        "uri" => "http://localhost:4001/objects/0f5dad44-0e9e-4610-b377-a2631e499190",
-        "url" => "http://localhost:4001/notice/9toJCu5YZW7O7gfvH6",
-        "visibility" => "private"
-      }
+        "source" => %{
+          "fields" => [],
+          "note" => "Tester Number 6",
+          "pleroma" => %{"actor_type" => "Person", "discoverable" => false},
+          "sensitive" => false
+        },
+        "statuses_count" => 1,
+        "url" => "http://localhost:4001/users/nick6",
+        "username" => "nick6"
+      },
+      "application" => %{"name" => "Web", "website" => nil},
+      "bookmarked" => false,
+      "card" => nil,
+      "content" => "foobar",
+      "created_at" => "2020-04-07T19:48:51.000Z",
+      "emojis" => [],
+      "favourited" => false,
+      "favourites_count" => 0,
+      "id" => "9toJCu5YZW7O7gfvH6",
+      "in_reply_to_account_id" => nil,
+      "in_reply_to_id" => nil,
+      "language" => nil,
+      "media_attachments" => [],
+      "mentions" => [],
+      "muted" => false,
+      "pinned" => false,
+      "pleroma" => %{
+        "content" => %{"text/plain" => "foobar"},
+        "conversation_id" => 345_972,
+        "direct_conversation_id" => nil,
+        "emoji_reactions" => [],
+        "expires_at" => nil,
+        "in_reply_to_account_acct" => nil,
+        "local" => true,
+        "spoiler_text" => %{"text/plain" => ""},
+        "thread_muted" => false
+      },
+      "poll" => nil,
+      "reblog" => nil,
+      "reblogged" => false,
+      "reblogs_count" => 0,
+      "replies_count" => 0,
+      "sensitive" => false,
+      "spoiler_text" => "",
+      "tags" => [],
+      "uri" => "http://localhost:4001/objects/0f5dad44-0e9e-4610-b377-a2631e499190",
+      "url" => "http://localhost:4001/notice/9toJCu5YZW7O7gfvH6",
+      "visibility" => "private"
     }
   })
 end