Merge branch 'fix/1658-invite-send' into 'develop'
[akkoma] / lib / pleroma / web / api_spec / schemas / app_create_request.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.AppCreateRequest do
6 alias OpenApiSpex.Schema
7 require OpenApiSpex
8
9 OpenApiSpex.schema(%{
10 title: "AppCreateRequest",
11 description: "POST body for creating an app",
12 type: :object,
13 properties: %{
14 client_name: %Schema{type: :string, description: "A name for your application."},
15 redirect_uris: %Schema{
16 type: :string,
17 description:
18 "Where the user should be redirected after authorization. To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter."
19 },
20 scopes: %Schema{
21 type: :string,
22 description: "Space separated list of scopes. If none is provided, defaults to `read`."
23 },
24 website: %Schema{type: :string, description: "A URL to the homepage of your app"}
25 },
26 required: [:client_name, :redirect_uris],
27 example: %{
28 "client_name" => "My App",
29 "redirect_uris" => "https://myapp.com/auth/callback",
30 "website" => "https://myapp.com/"
31 }
32 })
33 end