Problem/Motivation

Trying to access tokens over JSON:API at /jsonapi/token_custom/custom results in an error:

'Parameter "entity" for route "jsonapi.token_custom--custom.individual" must match "[^/]++" ("" given) to generate a corresponding URL.'

This appears to be because custom token entities do not have a UUID.

Steps to reproduce

Proposed resolution

Add a UUID base field to the entity type.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review

The MR adds the UUID base field to the entity, an update hook that sets UUIDs on existing entities, and a test to prove that JSON:API works.

Disclaimer: this MR was partially written by Claude Code.

longwave’s picture

Status: Needs review » Needs work

The update hook doesn't work properly, will fix that soon.

longwave’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#3426280: Prepare the module to work with EntityShare and JSON:API

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.