ncbo / ontologies_api

Hypermedia API for NCBO's ontology-related projects
http://data.bioontology.org
Other
25 stars 10 forks source link

Allow matchType as a value for the include parameter #62

Open jvendetti opened 4 years ago

jvendetti commented 4 years ago

End user reported the desire to retrieve "matchType" when using the include parameter with the search endpoint:

Using the 'Term Search' endpoint in your REST API, I would like to receive the 'properties' field alongside the 'matchType' field. Right now it is only possible to receive the 'matchType' if I don't add the 'include' parameter. Using 'include=properties' removes the 'matchType' and the 'include' does not accept 'matchType'. Also, 'include=all' does not work. Is it possible to receive both fields in one response?

The following example call:

http://data.bioontology.org/search?q=melanoma&include=matchType,properties

... results in a 400 error:

"The `include` query string parameter cannot accept matchType, please use only prefLabel, synonym, definition, notation, cui, semanticType, properties"

Leaving matchType out of the list of allowed include parameters appears to have been an oversight.