Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293211

Move the linkset functionality from the decoupled menus contributed module to core's system module

$
0
0

Problem/Motivation

We want to provide a JSON representation of any Drupal menu data to enable the use-case #1 of the decoupled initiative: #3189459: (use case #1) Provide an API response for "stateless menu" use case.

The format of the response follows IETF's proposed linkset format to avoid creating too many drupalism.

This was previously built in https://www.drupal.org/project/decoupled_menus

Proposed resolution

Since this menu data is read-only and doesn't fit in the JSON:API context, a new route has been declared in the system module directly meaning all websites will have it available without installing a new module.

The route is /system/menu/{menu}/linkset with menu being the machine name of the menu requested.

The links returned are the ones the requesting user has access to.

Remaining tasks

  1. Agree on where the code should live (system module, rest module, new module?)
  2. Review and fix what comes up :)

API changes

New endpoint to get menu data: /system/menu/[menu name]/linkset

Release notes snippet

TODO


Viewing all articles
Browse latest Browse all 293211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>