File size: 599 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 | 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
|