mapping-commons / sssom-api

Apache License 2.0
7 stars 0 forks source link

Create endpoints specially for the UI #47

Open anitacaron opened 1 year ago

anitacaron commented 1 year ago

Create another space to combine all endpoints used by the UI: /ui/entities/, /ui/mappings, /ui/mapping_sets

This will add everything that is only important for the UI.

These new endpoints will have fields not part of the SSSOM model but are important for the UI.

anitacaron commented 1 year ago

I was thinking of this in a general way. If I don't return an SSSOM data model conform, it will return only the data available. Is there a problem with that? Can you comment, @serjoshua, please?

New response:

{
      "uuid": "e0c84bcbc925587db7ceb69ef463951a",
      "subject_label": "abnormal iris transillumination",
      "predicate_id": "http://www.w3.org/2004/02/skos/core#closeMatch",
      "object_id": "http://purl.obolibrary.org/obo/HP_0012805",
      "object_label": "Iris transillumination defect",
      "mapping_justification": "https://w3id.org/semapv/LogicalReasoning",
      "subject_id": "MP:0012122"
    }

Previous response:

 {
      "subject_id": "MP:0012122",
      "predicate_id": "http://www.w3.org/2004/02/skos/core#closeMatch",
      "object_id": "http://purl.obolibrary.org/obo/HP_0012805",
      "mapping_justification": "https://w3id.org/semapv/LogicalReasoning",
      "subject_label": "abnormal iris transillumination",
      "subject_category": null,
      "predicate_label": null,
      "predicate_modifier": null,
      "object_label": "Iris transillumination defect",
      "object_category": null,
      "author_id": [],
      "author_label": [],
      "reviewer_id": [],
      "reviewer_label": [],
      "creator_id": [],
      "creator_label": [],
      "license": null,
      "subject_type": null,
      "subject_source": null,
      "subject_source_version": null,
      "object_type": null,
      "object_source": null,
      "object_source_version": null,
      "mapping_provider": null,
      "mapping_cardinality": null,
      "mapping_tool": null,
      "mapping_tool_version": null,
      "mapping_date": null,
      "confidence": null,
      "subject_match_field": [],
      "object_match_field": [],
      "match_string": [],
      "subject_preprocessing": [],
      "object_preprocessing": [],
      "semantic_similarity_score": null,
      "semantic_similarity_measure": null,
      "see_also": [],
      "other": null,
      "comment": null
    }
serjoshua commented 1 year ago

This is totally fine. I could do null-check on the frontend.