Many people get tripped up when they are configuring REST for the first time. We should configure it to work with all formats by default... since it is permissioned anyway, it doesn't open up data in any unexpected way.

CommentFileSizeAuthor
#3 2031647-03-default-rest-config.patch4.18 KBlinclark

Comments

klausi’s picture

Component: rdf.module » rest.module

I thought that it is not a good idea to have the Drupal installation bloated with additional node routes, but those routes would only be active if REST module is enabled. So only people enabling REST module would be affected, and they want it anyway because they enabled the module :-)

Yes, this is safe from a security access point of view. So no objection from me, patches welcome :-)

webchick’s picture

Priority: Normal » Major

Yes, please!

And since the instructions that are currently there in the help text are not working at all (due to a recent-ish change in CMI to only allow staging of entire configuration trees, adding just a rest.settings.yml to your staging directory results in 1 file changed, and 179 removed :\), this seems like it's at least major. You could really hose your site right now by following them.

linclark’s picture

Status: Active » Needs review
StatusFileSize
new4.18 KB

Here's a patch which configures all formats by default and documents how to add supported_formats.

I've also removed the detailed docs in hook_help in favor of keeping the docs in one place, the online handbook.

linclark’s picture

Actually, now that I'm thinking of it, I think alexpott wanted to get rid of the docs in the online handbook.

If the docs should be in hook_help and not the handbook, set this to needs work and I'll update the patch.

klausi’s picture

Status: Needs review » Needs work

I would also favor to just keep everything on the drupal.org doc page. It is much harder to get a core commit to change help text compared to just editing a doc page ;-)

So we need to copy all the useful bits of information to the doc page before we remove it here. The note to enable HAL module for example is missing there.

linclark’s picture

Status: Needs work » Needs review

I changed the doc page to include the dependency on HAL for POSTing.

klausi’s picture

Status: Needs review » Reviewed & tested by the community

OK, we should also put some working curl command line examples on the doc page, but that can be added later.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c25950f and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.