analytics/lib/plausible_web/plugins/api/schemas/error.ex
hq1 38b1834b3f
Tidy up openapi schema (#3498)
* Tidy up OpenAPI schema

* Remove `items` from object schema
2023-11-08 11:51:37 +01:00

17 lines
392 B
Elixir

defmodule PlausibleWeb.Plugins.API.Schemas.Error do
@moduledoc """
OpenAPI schema for an error included in a response
"""
use PlausibleWeb, :open_api_schema
OpenApiSpex.schema(%{
description: """
An explanation of an error that occurred within the Plugins API
""",
type: :object,
required: [:detail],
properties: %{detail: %Schema{type: :string}}
})
end