Skip to content

next_jsonapi breaks jsonapi_defaults funcionality #879

@erikrau

Description

@erikrau

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageA new issue that needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions