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

Add documentation for REST link relations

$
0
0

Problem/Motivation

There is no human readable documentation for a REST API.

Proposed resolution

Provide documentation for link relations. For example, see http://haltalk.herokuapp.com/rels/posts. When a site enables HAL, this documentation can be used to guide users through the API... see HAL Browser for HAL Talk.

Some APIs to XREF our new one.

How to test

  1. http://drupal.d8/admin/help/rest follow link to API
  2. http://drupal.d8/docs/rest/api
  3. http://drupal.d8/docs/rest/api/types/node/article
  4. http://drupal.d8/rest/relation/node/article/title

Remaining tasks

Code TODOs

ResourceRoutes.php
(103, 6) * TODO: why do we generate routes for relations?
(110, 8) // TODO: why filter out the non relation ones? Ie field_image is exposed through _links to ie HAL browser.
(119, 12) // FIXME
(122, 16) // TODO why use relation in link. This should be in */api/* path
(165, 8) // TODO: Change this to only expose info for REST enabled entity types.
(166, 8) // TODO: filter out all ConfigEntities

Controller.php
(15, 6) // TODO use DiC
(124, 8) // TODO fix for drupal_set_title
(133, 8) // TODO: SA what information is disclosed?
(135, 8) // TODO: how to check for field permissions?
(157, 8) // TODO use DIC
(162, 8) // TODO: Change this to only expose info for REST enabled entity types.
(169, 8) // TODO use DIC

User interface changes

API changes

Original report by @linclark


Viewing all articles
Browse latest Browse all 291486

Trending Articles



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