{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/print-one/json-schema/print-one-paginated-documented-schema.json",
  "title": "PaginatedDocumented",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/print-one-coupons-api-openapi.yml#/components/schemas/PaginatedDocumented",
  "type": "object",
  "properties": {
    "data": {
      "required": [],
      "title": "Array of items",
      "properties": {},
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "meta": {
      "title": "Pagination Metadata",
      "allOf": [
        {
          "$ref": "#/$defs/PaginatedMetaDocumented"
        }
      ]
    },
    "links": {
      "title": "Links to pages",
      "allOf": [
        {
          "$ref": "#/$defs/PaginatedLinksDocumented"
        }
      ]
    }
  },
  "required": [
    "meta",
    "links"
  ],
  "$defs": {
    "PaginatedLinksDocumented": {
      "type": "object",
      "properties": {
        "first": {
          "type": [
            "string",
            "null"
          ],
          "title": "Link to first page"
        },
        "previous": {
          "type": [
            "string",
            "null"
          ],
          "title": "Link to previous page"
        },
        "current": {
          "type": "string",
          "title": "Link to current page"
        },
        "next": {
          "type": [
            "string",
            "null"
          ],
          "title": "Link to next page"
        },
        "last": {
          "type": [
            "string",
            "null"
          ],
          "title": "Link to last page"
        }
      },
      "required": [
        "current"
      ]
    },
    "PaginatedMetaDocumented": {
      "type": "object",
      "properties": {
        "itemsPerPage": {
          "type": "number",
          "title": "Number of items per page"
        },
        "totalItems": {
          "type": "number",
          "title": "Total number of items"
        },
        "currentPage": {
          "type": "number",
          "title": "Current requested page"
        },
        "totalPages": {
          "type": "number",
          "title": "Total number of pages"
        },
        "sortBy": {
          "type": "array",
          "title": "Sorting by columns",
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "string",
                  "enum": [
                    "ASC",
                    "DESC"
                  ]
                }
              ]
            }
          }
        },
        "searchBy": {
          "title": "Search by fields",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "search": {
          "type": "string",
          "title": "Search term"
        },
        "filter": {
          "type": "object",
          "title": "Filters that applied to the query",
          "required": [],
          "properties": {}
        },
        "filterOptions": {
          "type": "object",
          "title": "Filters that applied to the query",
          "required": [],
          "properties": {}
        }
      },
      "required": [
        "itemsPerPage",
        "totalItems",
        "currentPage",
        "totalPages"
      ]
    }
  }
}