- 🇧🇪Belgium nightlife2008
Hey,
I came to the conclusion I could just reuse existing code from jsonapi_search_api with a little bit of search-api-view detection code (which could be improved!).
The fact that the patch alters more than required, is that I rebuilt the file first in a custom module, and while doing so, replaced/reordered some things:
- Jsonapi base path injection
- basepath variable removed in favor of just a string
- applied some code standard formattingI tested it with my 160 views/displays and everything kept working afaik.
I welcome any feedback!
All credits go to Centarro's @jsacksick and @mglaman, the maintainers of the jsonapi_search_api module.
greets,
Kim - Status changed to Needs review
almost 2 years ago 4:12pm 27 January 2023 The last submitted patch, 6: 3269755-jsonapi_views-provide-routes-for-searchapi-views.patch, failed testing. View results →
- Status changed to Needs work
almost 2 years ago 8:45am 10 February 2023 - 🇯🇵Japan tyler36 Osaka
Seems to be an incompatibilty issue between
Drupal\Tests\jsonapi_views\Functional\JsonapiViewsResourceTest::setUp($import_test_views = true): void
Drupal\Tests\views\Functional\ViewTestBase::setUp($import_test_views = true, $modules = Array)
Drupal\Tests\views\Functional\ViewTestBase::setUp
is using old < PHP 8 style PHPUnit setup. - 🇯🇵Japan tyler36 Osaka
On second glance,
JsonapiViewsResourceTest
is also only passing 1 parameter, whereas `ViewTestBase` has 2. - Status changed to Needs review
almost 2 years ago 4:16pm 10 February 2023 - 🇮🇳India Aaron23
@nightlife2008 Patch looks good., I have tried and it was working good.
Thanks