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
25 lines
599 B
Elixir
25 lines
599 B
Elixir
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
|