mirror of
https://github.com/plausible/analytics.git
synced 2024-12-27 03:21:37 +03:00
38b1834b3f
* Tidy up OpenAPI schema * Remove `items` from object schema
24 lines
549 B
Elixir
24 lines
549 B
Elixir
defmodule PlausibleWeb.Plugins.API.Schemas.PaymentRequired do
|
|
@moduledoc """
|
|
OpenAPI schema for a generic 402 response
|
|
"""
|
|
|
|
use PlausibleWeb, :open_api_schema
|
|
|
|
OpenApiSpex.schema(%{
|
|
description: """
|
|
The response that is returned when the user makes a request that cannot be
|
|
processed due to their subscription limitations.
|
|
""",
|
|
type: :object,
|
|
title: "PaymentRequiredError",
|
|
required: [:errors],
|
|
properties: %{
|
|
errors: %Schema{
|
|
items: Schemas.Error,
|
|
type: :array
|
|
}
|
|
}
|
|
})
|
|
end
|