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
- #3580102: Massive performance issues when having more than 100 Views
- #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
Issue fork jsonapi_views-3587946
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
Comment #2
anybodyComment #3
anybodyI think this should be relatively easy to achieve by changing the default for
enabledto FALSE!Comment #5
anybodyComment #6
anybodyComment #7
grevil commentedLGTM! Opt-in makes more sense, especially for mixed (not headless only) projects and for security reasons.
Comment #9
anybodyFailing tests are unrelated.