analytics / lib /plausible_web /plugins /api /schemas /pagination_metadata.ex
Leon4gr45's picture
Upload folder using huggingface_hub (part 3)
88211d3 verified
Raw
History Blame Contribute Delete
599 Bytes
defmodule PlausibleWeb.Plugins.API.Schemas.PaginationMetadata do
@moduledoc """
Pagination metadata OpenAPI schema
"""
use PlausibleWeb, :open_api_schema
OpenApiSpex.schema(%{
title: "PaginationMetadata",
description: "Pagination meta data",
type: :object,
required: [:has_next_page, :has_prev_page],
properties: %{
has_next_page: %Schema{type: :boolean},
has_prev_page: %Schema{type: :boolean},
links: %Schema{
properties: %{
next: Schemas.Link,
prev: Schemas.Link
},
type: :object
}
}
})
end