You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible_web/plugins/api/schemas/unprocessable_entity.ex

24 lines
531 B
Elixir

defmodule PlausibleWeb.Plugins.API.Schemas.UnprocessableEntity do
@moduledoc """
OpenAPI schema for a generic 422 response
"""
use PlausibleWeb, :open_api_schema
OpenApiSpex.schema(%{
description: """
The response that is returned when the user makes a request that cannot be
processed.
""",
type: :object,
title: "UnprocessableEntityError",
required: [:errors],
properties: %{
errors: %OpenApiSpex.Schema{
items: Schemas.Error,
type: :array
}
}
})
end