Active
Project:
Entity Segment
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2026 at 06:52 UTC
Updated:
22 Jul 2026 at 06:52 UTC
Jump to comment: Most recent
SegmentJsonApiController assembles its JSON:API document by hand. Three consequences:
$target_type . '--' . $entity->bundle(), bypassing the resource type repository. Any site that renames or disables a resource via jsonapi_resource_config receives a type that does not exist in its API.links and no pagination. A segment resolving to 50,000 members returns 50,000 resource identifiers in a single response.AccessDeniedHttpException rather than a JSON:API error document, so a client parsing errors[] gets nothing useful.Depend on JSON:API Resources — suggested and runtime-guarded like the other optional integrations — and reimplement both endpoints as ResourceBase plugins. Resolve types through ResourceTypeRepositoryInterface.
entity_segment.audience_access remains the sole access chokepoint. Only the transport changes.
jsonapi_resources is a suggestion or a hard requirement of the JSON:API integration.type and the error document shape in tests.None.
The response gains links and pagination; the 403 body changes shape. The module is alpha with no backwards-compatibility promise, so no shim is needed — note it in the release notes.
None.
Comments