next-drupal
next-drupal copied to clipboard
next_jsonapi breaks jsonapi_defaults funcionality
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:
- First enable jsonapi_extras and jsonapi_defaults.
- Then configure a resource e.g.: /admin/config/services/jsonapi/resource_types/node--article/edit
- Add Default include list e.g.: uid
- Visit /jsonapi/node/article and you will have user information included.
- Enable module next_jsonapi.
- 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