Feature: Infrastructure Kernel Support for JSON-LD and Hypermedia #11

Closed
opened 2026-07-04 21:32:10 +00:00 by psycodepath · 0 comments
Owner

Motivation

Provide a standardized response helper and serializer mechanism to render JSON-LD and hypermedia formats consistently across all API endpoints.

Description

Create reusable HTTP response helper classes, serialisation structures, and paging templates aligned with Hydra's specification.

User Story

As a developer, I want to reuse JSON-LD responses so that API development is consistent and simple.

Gherkin Feature

Feature: Kernel API Response Utilities
  As the HRP application
  I want to format responses as JSON-LD with hypermedia links
  So that api clients can discover relationships and navigate paginated lists

Acceptance Criteria

  • Reusable JsonLdResponse class in Kernel/Infrastructure/Web.
  • Serializer support for hydra:Collection containing pagination fields (hydra:first, hydra:next, etc.).
  • Unified error format serialized in JSON-LD.
  • Basic unit tests for serialization and pagination helper logic.
### Motivation Provide a standardized response helper and serializer mechanism to render JSON-LD and hypermedia formats consistently across all API endpoints. ### Description Create reusable HTTP response helper classes, serialisation structures, and paging templates aligned with Hydra's specification. ### User Story As a developer, I want to reuse JSON-LD responses so that API development is consistent and simple. ### Gherkin Feature ```gherkin Feature: Kernel API Response Utilities As the HRP application I want to format responses as JSON-LD with hypermedia links So that api clients can discover relationships and navigate paginated lists ``` ### Acceptance Criteria - [ ] Reusable `JsonLdResponse` class in `Kernel/Infrastructure/Web`. - [ ] Serializer support for `hydra:Collection` containing pagination fields (`hydra:first`, `hydra:next`, etc.). - [ ] Unified error format serialized in JSON-LD. - [ ] Basic unit tests for serialization and pagination helper logic.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psycodepath/hrp#11
No description provided.