Merge branch 'fix/1658-invite-send' into 'develop'
[akkoma] / lib / pleroma / web / api_spec / schemas / app_create_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.AppCreateResponse do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "AppCreateResponse",
12 description: "Response schema for an app",
13 type: :object,
14 properties: %{
15 id: %Schema{type: :string},
16 name: %Schema{type: :string},
17 client_id: %Schema{type: :string},
18 client_secret: %Schema{type: :string},
19 redirect_uri: %Schema{type: :string},
20 vapid_key: %Schema{type: :string},
21 website: %Schema{type: :string, nullable: true}
22 },
23 example: %{
24 "id" => "123",
25 "name" => "My App",
26 "client_id" => "TWhM-tNSuncnqN7DBJmoyeLnk6K3iJJ71KKXxgL1hPM",
27 "client_secret" => "ZEaFUFmF0umgBX1qKJDjaU99Q31lDkOU8NutzTOoliw",
28 "vapid_key" =>
29 "BCk-QqERU0q-CfYZjcuB6lnyyOYfJ2AifKqfeGIm7Z-HiTU5T9eTG5GxVA0_OH5mMlI4UkkDTpaZwozy0TzdZ2M=",
30 "website" => "https://myapp.com/"
31 }
32 })
33 end