Skip to content

Total in meta with pagination #23

@rafaltrojanowski

Description

@rafaltrojanowski

Expected Behavior

I'm calling
http://{{host}}/api/tasks?page[size]=10

I would expect that meta["total"] equals the number of items passed to jsonapi_paginate method.

Actual Behavior

    "meta": {
        "pagination": {
            "current": 1,
            "next": 2,
            "last": 20
        },
        "total": 10
    },

However Model.all size that I'm passing to jsonapi_paginate is different that total from meta.
Is it expected behaviour?

Steps to Reproduce the Problem

Specifications

  • Version: 1.5.7
  • Ruby version: 2.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions