Open hlapp opened 8 years ago
The link to the API endpoint documentation above is obsolete, but at the now current documentation the same problem remain (documentation incorrect in not mentioning relationships), and the subClassOf
/is_a
are still not being returned.
$ curl -X GET "http://kb.phenoscape.org/api/term?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0011618" -H "accept: application/json"
TODO:
The Term detail API endpoint at
/api/term
according to documentation returns only a label and a textual definition. In reality this is not true. For one, it also returns the@id
attribute with the term ID (which is a good thing and should be kept, but is counter to documentation).Secondly, it also returns
relationships
. For the example in the docs (basihyal bone), this is the following:Aside from the fact that it is counter to documentation, I'm wondering why it is missing the
is_a
orsubClassOf
relationships?In principle the relationships of a term are useful information and seem pertinent to a term's detail. However, when introducing such changes that add an attribute with zero or more values (in contrast to one value such as for label and definition) one needs to be aware that they can easily break code that uses the API in a way that expects (and in the documentation is promised!) a simple list of single-valued attributes. See xu-hong/rphenoscape#6 and xu-hong/rphenoscape#8 as an example.