Open putmantime opened 2 years ago
This is still an issue, but there are a few things that make it not a huge issue:
Smart api uptime checks don't really check the content of responses, only a http response status code 200. This means default examples don't necessarily need to match a specific plater, as long as they work and return a valid 200 response, even if it's an empty result.
Smart api uptime checks are skipped if there are required parameters for an endpoint but no example parameters are provided. This is currently how a couple of these endpoints are set up.
Plater previously split some endpoints into two separate openapi specs (one for TRAPI and one for the rest) and we only exposed one of them to the smart api. This was undone recently but is still an option.
All that being said, since this issue was written, we implemented functionality that automatically uses an example edge from the test data file provided to generate the example query for the /query endpoint. Something like that could be done for the rest of the endpoints as well, and might be nice to have working examples for everything.
Currently included examples for each path requires adding a trapi message as a json file to the /examples directory. This only supports calls that are trapi interface queries.
SRI Reference graph has additional calls that are GET and take arguments as below:
For example: https://trapi.monarchinitiative.org/docs#/default/node__node_type___curie__get
Just takes a biolink node type and curie as part of the constructed url e.g. 'https://trapi.monarchinitiative.org/biolink%3ADisease/MONDO%3A0000251'