File size: 977 Bytes
88211d3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | defmodule PlausibleWeb.Plugins.API.Schemas.SharedLink do
@moduledoc """
OpenAPI schema for SharedLink object
"""
use PlausibleWeb, :open_api_schema
OpenApiSpex.schema(%{
description: "Shared Link object",
type: :object,
required: [:shared_link],
properties: %{
shared_link: %Schema{
type: :object,
required: [:id, :name, :password_protected, :href],
properties: %{
id: %Schema{type: :integer, description: "Shared Link ID"},
name: %Schema{type: :string, description: "Shared Link Name"},
password_protected: %Schema{
type: :boolean,
description: "Shared Link Has Password"
},
href: %Schema{type: :string, description: "Shared Link URL"}
}
}
},
example: %{
shared_link: %{
id: 1024,
name: "Public Dashboard",
password_protected: false,
href: "https://example.com"
}
}
})
end
|