This PR introduces a new feature to this project - View representation of a compound document represented in a hierarchical structure of related Submitted Data, consolidating all related data for a central entity, or centric schema, while organizing both its parent and child relationships within the document. This structure will enable more efficient data access by aggregating connected data into a single view.
Here's how each relationships are represented:
Centric Schema: The central entity is the focal point of the document. All related data, including both parent and child records, is organized around this entity.
Child entities: Displayed in arrays within the centric schema document. Each child entry includes relevant information and may also contain an array of its own children allowing for a nested, hierarchical structure.
Parent entity: representing the entity to which the centric entity belongs, is stored as a single, unique field within the centric schema document.
Code changes:
Changes on existing GET data endpoints to add a query parameter view. This specify the data representation to be returned. Use list to return an unordered list of entities; compound to return a compound document nesting using scheme centric structure.
Change on register new Dictionary endpoint to include new body parameter defaultCentricEntity. This value is used to form compound documents.
New environment variables: NESTED_RECORD_PREFIX, NESTED_RECORD_SUFFIX, PARENT_RECORD_PREFIX, PARENT_RECORD_SUFFIX
Description
This PR introduces a new feature to this project - View representation of a compound document represented in a hierarchical structure of related Submitted Data, consolidating all related data for a central entity, or centric schema, while organizing both its parent and child relationships within the document. This structure will enable more efficient data access by aggregating connected data into a single view.
Here's how each relationships are represented:
Code changes:
view
. This specify the data representation to be returned. Uselist
to return an unordered list of entities;compound
to return a compound document nesting using scheme centric structure.defaultCentricEntity
. This value is used to form compound documents.NESTED_RECORD_PREFIX
,NESTED_RECORD_SUFFIX
,PARENT_RECORD_PREFIX
,PARENT_RECORD_SUFFIX