Problem/Motivation

Currently the README.md says

When installed the module activates resources for all of your enabled views, you can optionally disable the resource by editing the view.

Issues like

  1. #3580102: Massive performance issues when having more than 100 Views
  2. #3403820: /jsonapi/views endpoints not listed anywhere

show that this should better be inverted to be opt-in (and additionally maybe add a helper to do that in batch, e.g. on a settings page: #3575185: Add a settings page to disable resources in batch / drush.
Also I think it's safer to opt-in views that should provide JSON:API support to not publish any view unexpectedly, e.g. system views.

Steps to reproduce

Enable this module and have probably (unwanted) json:api endpoints for all views as documented

Proposed resolution

Enable the json:api endpoint only on views where needed

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

anybody created an issue. See original summary.

anybody’s picture

Issue tags: +Novice

I think this should be relatively easy to achieve by changing the default for enabled to FALSE!

anybody’s picture

Issue summary: View changes
anybody’s picture

Status: Active » Needs review
grevil’s picture

Status: Needs review » Reviewed & tested by the community

LGTM! Opt-in makes more sense, especially for mixed (not headless only) projects and for security reasons.

budalokko made their first commit to this issue’s fork.

Rebased against current 8.x-1.x, applies cleanly on the latest 8.x-1.2 release.

anybody’s picture

Issue tags: -Novice

Failing tests are unrelated.