Problem/Motivation

Is there any solution to add the generated routes on /jsonapi links?

Thank you.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andreiq created an issue. See original summary.

deciphered’s picture

I suspect this is actually an issue for the JSON:API Resources module.

@mglaman Can you weigh in on this?

mglaman’s picture

We used the JSON:API Hypermedia module in Commerce API to achieve this: https://git.drupalcode.org/project/commerce_api/-/tree/8.x-1.x/src/Plugi.... Specifically in CurrentStoreLinkProvider

* @JsonapiHypermediaLinkProvider(
*   id = "commerce_api.top_level.current_store",
*   link_relation_type = "current-store",
*   link_context = {
*     "top_level_object" = "entrypoint",
*   },
* )

JSON:API Views could have a link provider plugin and a deriver for each View expose as a resource.

jeremyrperry made their first commit to this issue’s fork.

brianperry made their first commit to this issue’s fork.

brianperry’s picture

Status: Active » Needs work

Ran into this issue and gave the existing feature branch a try. Doesn't seem to be working for me quite yet. Didn't have time to fully debug, but did push up a new branch with:

* The latest module code merged in.
* Changing jsonapi_hypermedia from a dev dependency to a suggested dependency.
* Adjusted the format of the link key to remove what I consider to be a redundant use of 'jsonapi'

Hope to get back to this one at some point.

anybody changed the visibility of the branch 3173663-display-the-links to hidden.

anybody changed the visibility of the branch feature/issue-3173663 to hidden.

anybody’s picture

@brianperry plans to proceed here?