Open
Description
Issue Overview
We currently have two separate data models for API calls related to relationships and permissions. This leads to minor code duplication, as two different data types/interfaces are needed for JSON serialization.
Proposed Enhancement
I suggest adopting a unified data model that utilizes a URN (Uniform Resource Name) format. This approach can streamline API calls and reduce the redundancy in our code.
Current Approach:
- Separate models for relationship-related and permission-related API calls.
- Requires defining multiple data types/interfaces for similar structures.
Suggested Data Model:
- A single, generic data model using a URN format.
- Example:
entity
: {}type
: "urn:relation:parent" or "urn:permission:edit" (replacing separate relationship and permission types)subject
: {}
Benefits of the Proposed Change
- Code Simplification: Reduces the need for multiple data type definitions, leading to cleaner and more maintainable code.
- Enhanced Flexibility: The URN format allows for more descriptive and context-rich identifiers.
- Scalability: Easier to extend and modify for future API requirements.
Impact on Current System
- This change will primarily affect how we structure API calls and data serialization.
- It will require a review and possible refactoring of existing API endpoints and data handling methods.
Metadata
Metadata
Assignees
Type
Projects
Status
Q1 2024 – Jan-Mar