Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

490 B
Raw Blame
defmodule PlausibleWeb.Plugins.API.Schemas.Unauthorized do
  @moduledoc """
  OpenAPI schema for a generic 401 response
  """

  use PlausibleWeb, :open_api_schema

  OpenApiSpex.schema(%{
    description: """
    The response that is returned when the user makes an unauthorized request.
    """,
    type: :object,
    title: "UnauthorizedError",
    required: [:errors],
    properties: %{
      errors: %Schema{
        items: Schemas.Error,
        type: :array
      }
    }
  })
end