Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a KP I need to be able to add examples for all types of calls to be able to pass all SmartAPI uptime checks. #70

Open
putmantime opened this issue May 13, 2022 · 1 comment

Comments

@putmantime
Copy link

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'

@EvanDietzMorris
Copy link
Collaborator

This is still an issue, but there are a few things that make it not a huge issue:

  1. 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.

  2. 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.

  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants