Problem/Motivation
Several list resources (ReviewsGetResource, NodesDiscountGetResource, NodesDoctorGetResource, NodesPackageGetResource, NodesVideoReviewsGetResource) use \Drupal\search_api\Entity\Index and throw SearchApiException, but search_api is declared neither in myrest.info.yml nor in composer.json. Without it installed these endpoints fatal.
Proposed resolution
- Add
drupal/search_apito thesuggestsection ofcomposer.json. - Guard
MyrestHelper::getSearchApiIndexStorage()consumers and return a documented 501/503 response when the index is unavailable. - Skip registration of the affected resource plugins when the module is missing.
Remaining tasks
Add guards, update metadata, and cover the missing-module path with a test.
User interface changes
None.
API changes
Search-backed endpoints degrade gracefully instead of fataling.
Issue fork myrest-3615466
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 #4
sergeydruua commentedComment #6
sergeydruua commented