GithubHelp home page GithubHelp logo

Comments (2)

matthewtrask avatar matthewtrask commented on August 17, 2024

There are definitely examples of links being outside of meta out there. I know in my responses I put links in a few places depending on the context:

  1. on the object inside the data array. That way the client knows the available actions for that object. i.e. the next GET, PUT, DELETE etc.
  2. on its own in a huge result set that is paginated.
  3. in the meta object.

I could be wrong, but I think we let the end user of the library decide where they want to put the links. However Im definitely open to ideas on how to make it better for the user here.

from fractal.

KorvinSzanto avatar KorvinSzanto commented on August 17, 2024

The JSON:API spec is pretty clear about this: https://jsonapi.org/format/#fetching-pagination

Pagination links MUST appear in the links object that corresponds to a collection. To paginate the primary data, supply pagination links in the top-level links object. To paginate an included collection returned in a compound document, supply pagination links in the corresponding links object

The top level (or object specific) links object must contain the pagination links if pagination is supported. The meta could also contain urls but they are just arbitrary metadata.

from fractal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.