Open jvwong opened 3 years ago
@metincansiper , @jvwong
There is code
public String biopaxUrlToFactoid( @ApiParam("URL of a BioPAX RDF/XML file") @RequestBody String url) { BiopaxToFactoid converter = new BiopaxToFactoid(); try { String body = getContentFromUrl(url); InputStream is = new ByteArrayInputStream(body.getBytes(StandardCharsets.UTF_8));
which I doubt it works - it is read the URL string itself instead of the remote file/content I bet Why @RequestBody String url ? (not @RequestParam String url) Are you really sending the URL as the request body content instead of using some JSON object or query parameter? (Sorry if I am missing something - long time not looking here ;)))
@jvwong I updated the api description. I think we resolved the grounding issue in another thread.
Regarding the endpoint
/biopax-url-to-json
Could you indicate (swagger) what format you are expecting when the
url
is retrieved? I suspect it's not BioPAX owl, application/xml but a tar.gz file?grounding: I don't believe this makes its way into the JSON response for bioentities. Ideally biofactoid would want NCBI Gene uids, but I realize there might be some mapping required for that.