From 63ca78ca7a2e60b080ae58667ebe9a4f245e409e Mon Sep 17 00:00:00 2001 From: gebele Date: Tue, 30 Jan 2018 14:11:56 +0000 Subject: changed input type from array to string to fix array of descriptors form data issue --- api/api.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/api/api.json b/api/api.json index 7777f1e..23dd1cc 100644 --- a/api/api.json +++ b/api/api.json @@ -709,7 +709,7 @@ "descriptor" ], "summary": "Descriptor calculation", - "description": "Calculate descriptors for a single compound as SMILES string
curl example:
curl -Lk -X POST -i  -H \"Accept:application/json\" -F \"identifier=O=C1NC(=O)NC=C1\" -F \"descriptor=Openbabel.MW,JoeLib.LogP\" https://api.in-silico.ch/compound/descriptor 
.", + "description": "Calculate descriptors for a single compound as SMILES string
curl example:
curl -Lk -X POST -i  -H \"Accept:application/json\" -F \"identifier=O=C1NC(=O)NC=C1\" -F \"descriptor=Openbabel.MW,Openbabel.atoms\" https://api.in-silico.ch/compound/descriptor 
.", "consumes": [ "multipart/form-data" ], @@ -724,12 +724,9 @@ { "name": "descriptor", "in": "formData", - "description": "array of descriptors", + "description": "list of comma seperated descriptors", "required": true, - "type": "array", - "items": { - "type": "string" - } + "type": "string" }, { "$ref": "#/parameters/subjectid" -- cgit v1.2.3 From 3ecd85f1fd7c397d8544be61ba9c3dcc3ff301fe Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 7 May 2018 12:40:36 +0200 Subject: use top layer model id for list --- lib/model.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model.rb b/lib/model.rb index 52553fa..9fbd90f 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -11,7 +11,7 @@ get "/model/?" do when "application/json" models = JSON.parse models.to_json list = [] - models.each{|m| list << uri("/model/#{m["model_id"]["$oid"]}")} + models.each{|m| list << uri("/model/#{m["_id"]["$oid"]}")} return list.to_json else bad_request_error "Mime type #{@accept} is not supported." -- cgit v1.2.3