next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

next_jsonapi breaks jsonapi_defaults funcionality

Open erikrau opened this issue 5 months ago • 0 comments

Package containing the bug

next (Drupal module)

Describe the bug

With the help of the jsonapi_defaults module (submodule of jsonapi_extras), you can add standard includes, filters, or sorting. The module changes the class definition for jsonapi.entity_resource. next_jsonapi also changes the class definition for jsonapi.entity_resource, which means that jsonapi_defaults no longer works.

Expected behavior

With next_jsonapi enabled I can also use jsonapi_defaults functionality.

Steps to reproduce:

  1. First enable jsonapi_extras and jsonapi_defaults.
  2. Then configure a resource e.g.: /admin/config/services/jsonapi/resource_types/node--article/edit
  3. Add Default include list e.g.: uid
  4. Visit /jsonapi/node/article and you will have user information included.
  5. Enable module next_jsonapi.
  6. Visit /jsonapi/node/article and you won't have user information included.

Additional context

https://github.com/chapter-three/next-drupal/blob/main/modules/next/modules/next_jsonapi/src/NextJsonapiServiceProvider.php#L20

erikrau avatar Sep 30 '25 09:09 erikrau