Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Pass the request context to the RelativeLinks generators #39

@rknLA

Description

@rknLA

I'm not super confident in how the relative links generators are to begin with, but it's clear that they need a bit more for paginating search results (i.e. the search query parameters should stay the same, but the page or offset should change for the next or previous page).

Two ways of handling this come to mind:

  1. A QueryResult object that contains the original query, and thus can propagate the parameters to the link generator (and therefore also requires no changes to pale), or,
  2. Pull the parameters off of the context in the link generator itself, thus requiring the context.

This prompts a larger question around relative links in general - this is one of the places where there needs to be actual logic in the resource, which makes it more of a module than a manifest document, which feels counter to the spirit of the library in the first place. Another option there is to force the underlying model to provide the link data, which is then implicit in the resource definition..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions