Use `json_response_and_validate_schema/2` in tests to validate OpenAPI schema
[akkoma] / lib / pleroma / web / api_spec / schemas / list.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.List do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "List",
12 description: "Response schema for a list",
13 type: :object,
14 properties: %{
15 id: %Schema{type: :string},
16 title: %Schema{type: :string}
17 },
18 example: %{
19 "id" => "123",
20 "title" => "my list"
21 }
22 })
23 end