Skip to content

Change entity linking so it isn't dependent on the data model. #71

@mcbloch

Description

@mcbloch

We have multiple layers in the code

model (database and its tables and querries)
|
\/
controller (transforms the db object to the correct model)
|
\/
view (puts the nice model in a valid json response).

Our model has one tag table and most entities (like issues and branches) have their main id in there. This means that a link can be establisht with one endpoint ex. /project/:project-id/link/:object-to-link-id, and that there are no collisions.
The bad thing is that the view layer is now dependent on that property of the model layer. Which breaks the concept of seperated layers. Changing the model could mean changing the view, the api and in result the frontend.

Better would be to indicate the type of link in the body of the request:
POST /project/20/link body: {"repositories": [145, 146], "issues": [302]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions