Use `json_response_and_validate_schema/2` in tests to validate OpenAPI schema
[akkoma] / lib / pleroma / web / api_spec / schemas / api_error.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.ApiError do
6 alias OpenApiSpex.Schema
7
8 require OpenApiSpex
9
10 OpenApiSpex.schema(%{
11 title: "ApiError",
12 description: "Response schema for API error",
13 type: :object,
14 properties: %{error: %Schema{type: :string}},
15 example: %{
16 "error" => "Something went wrong"
17 }
18 })
19 end