Problem/Motivation

When adding a Rest export on ie http://drupal.d8/admin/structure/views/view/frontpage the generated response when visiting the configured URL say http://drupal.d8/api/rest/nodes it should note return an array with each item being a HAL response object.

[ <======== wrong
  {
    "_links": {
      "self": {
        "href": "http://drupal.d8/node/2"
      },
      "type": {
        "href": "http://drupal.d8/rest/type/node/article"
      },
  }

You can check this with https://github.com/mikekelly/hal-browser and attached orders.json.txt

The hal browser nicely presents the order.json document but chokes on the views output.

Proposed resolution

Follow the example http://tools.ietf.org/html/draft-kelly-json-hal-06#section-6

- pagers should be added to _links
- _embed should contain the list of nodes

Another page to check for is on http://haltalk.herokuapp.com/explorer/browser.html#/users

Remaining tasks

User interface changes

API changes

http://drupal.d8/admin/structure/views/view/content

CommentFileSizeAuthor
orders.json_.txt868 bytesclemens.tolboom

Comments

clemens.tolboom’s picture

dawehner’s picture

Status: Active » Closed (duplicate)
clemens.tolboom’s picture