Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
[akkoma] / lib / pleroma / web / api_spec / schemas / chat_messages_response.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ApiSpec.Schemas.ChatMessagesResponse do
6 alias Pleroma.Web.ApiSpec.Schemas.ChatMessageResponse
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "ChatMessagesResponse",
12 description: "Response schema for multiple ChatMessages",
13 type: :array,
14 items: ChatMessageResponse,
15 example: [
16 %{
17 "emojis" => [
18 %{
19 "static_url" => "https://dontbulling.me/emoji/Firefox.gif",
20 "visible_in_picker" => false,
21 "shortcode" => "firefox",
22 "url" => "https://dontbulling.me/emoji/Firefox.gif"
23 }
24 ],
25 "created_at" => "2020-04-21T15:11:46.000Z",
26 "content" => "Check this out :firefox:",
27 "id" => "13",
28 "chat_id" => "1",
29 "actor" => "https://dontbulling.me/users/lain"
30 },
31 %{
32 "actor" => "https://dontbulling.me/users/lain",
33 "content" => "Whats' up?",
34 "id" => "12",
35 "chat_id" => "1",
36 "emojis" => [],
37 "created_at" => "2020-04-21T15:06:45.000Z"
38 }
39 ]
40 })
41 end