Merge branch 'develop' into openapi/account
[akkoma] / lib / pleroma / web / api_spec / schemas / account_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.AccountCreateResponse do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "AccountCreateResponse",
12 description: "Response schema for an account",
13 type: :object,
14 properties: %{
15 token_type: %Schema{type: :string},
16 access_token: %Schema{type: :string},
17 scope: %Schema{type: :array, items: %Schema{type: :string}},
18 created_at: %Schema{type: :integer}
19 },
20 example: %{
21 "JSON" => %{
22 "access_token" => "i9hAVVzGld86Pl5JtLtizKoXVvtTlSCJvwaugCxvZzk",
23 "created_at" => 1_585_918_714,
24 "scope" => ["read", "write", "follow", "push"],
25 "token_type" => "Bearer"
26 }
27 }
28 })
29 end