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/goal/pageview.ex

31 lines
839 B
Elixir

defmodule PlausibleWeb.Plugins.API.Schemas.Goal.Pageview do
@moduledoc """
OpenAPI schema for Pageview Goal object
"""
use PlausibleWeb, :open_api_schema
OpenApiSpex.schema(%{
description: "Pageview Goal object",
title: "Goal.Pageview",
type: :object,
allOf: [
Schemas.Goal.Type,
%Schema{
type: :object,
required: [:goal],
properties: %{
goal: %Schema{
type: :object,
required: [:id, :display_name, :path],
properties: %{
id: %Schema{type: :integer, description: "Goal ID", readOnly: true},
display_name: %Schema{type: :string, description: "Display name", readOnly: true},
path: %Schema{type: :string, description: "Page Path"}
}
}
}
}
]
})
end