I think we should add a json (not json-ld) example to the rest_help() for GET.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Furthermore, I think we should enhance CreateTest for json content-type. The current test only creates with json-ld

wiifm’s picture

Status: Active » Needs review
FileSize
3.72 KB
52.25 KB
38.21 KB

Attached is a patch to clean up the hook_help() for the rest module. It also adds in additional information next to each checkbox to denote the path the resource will be available on.

@moshe - can the test enhancements be placed in a follow up issue?

Before patch:

rest1.png

After patch:

rest2.png

wiifm’s picture

Title: Add CURL example for GET to admin/config/services/rest » Cleanup the administration screen and add better help on admin/config/services/rest

Updating the title to reflect the slightly larger scope. Next steps will be to implement the new table select magic from admin/modules.

wiifm’s picture

Have now implemented theme_tableselect() upon the admin page. This at least provides an extensible way to show more information for each web service.

E.g. possible additions could be 'supported methods', 'permissions' etc

rest3.png

wiifm’s picture

Improvements based on @moshe weitzman's feedback (text only changes). Now there is also a cURL accept header for JSON LD as an example.

rest4.png

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +WSCCI

I think this is a great improvement in text and layout. We could eventually ask plugin implementations to declare their Path instead of special casing for Entity.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yay for giving people non-destructive instructions first! ;) This looks like a great improvement.

Committed and pushed to 8.x. Thanks!

webchick’s picture

Hm. Something is not right. Not sure if it's a problem w/ this patch or not: #1912692: REST module seems to be borked atm.

klausi’s picture

Status: Fixed » Needs work

Yep, the GET help text for nodes is useless right now, since nodes are not converted to EntityNG yet. You need to use entity_test in the GET example.

moshe weitzman’s picture

Category: bug » feature
Status: Needs work » Postponed
Issue tags: +revisit before beta

Lets just focus on moving nodes to EntityNG. Marking as postponed.

klausi’s picture

Status: Postponed » Closed (won't fix)

The REST admin page has been removed from core. Please help to improve to doc page at https://drupal.org/documentation/modules/rest or report any REST UI problems to the contrib module: https://drupal.org/project/restui

webchick’s picture

Issue tags: -revisit before beta

Since the screen doesn't exist anymore, there's nothing to revisit before release.

webchick’s picture

Issue summary: View changes

Updated issue summary.