diff options
author | rautenberg <rautenberg@in-silico.ch> | 2016-09-02 11:16:30 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2016-09-02 11:16:30 +0200 |
commit | 92b97c9a5de643c69a72aa955f1b991b6cf8d296 (patch) | |
tree | 7e1b75db89c0aa98122e6d5c2ec46f8c95647e77 | |
parent | 4edf9811fbdc500ecc8195d6624455218818c33f (diff) |
add feature route
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | api/api.json | 89 | ||||
-rw-r--r-- | lib/lazar-rest.rb | 1 |
3 files changed, 91 insertions, 0 deletions
@@ -1,2 +1,3 @@ # lazar-rest REST interface to lazar + diff --git a/api/api.json b/api/api.json index 0ad3be8..e253fe7 100644 --- a/api/api.json +++ b/api/api.json @@ -369,6 +369,91 @@ } } }, + "/feature": { + "get": { + "tags": [ + "feature" + ], + "description": "Get a list of all features", + "parameters": [ + { + "name": "accept", + "in": "header", + "description": "requested Content-Type", + "required": true, + "type": "string", + "enum": [ + "text/uri-list", + "application/json" + ] + } + ], + "produces": [ + "text/uri-list", + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/200" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + } + } + }, + "/feature/{id}": { + "get": { + "tags": [ + "feature" + ], + "description": "Get feature representation", + "parameters": [ + { + "name": "Content-Type", + "in": "header", + "description": "body Content-Type", + "required": true, + "type": "string", + "enum": [ + "application/json" + ] + }, + { + "$ref": "#/parameters/id" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "$ref": "#/responses/200" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + } + } + } + }, "/validation": { "get": { "tags": [ @@ -807,6 +892,10 @@ { "name": "substance", "description": "Substance" + }, + { + "name": "feature", + "description": "Feature" } ] }
\ No newline at end of file diff --git a/lib/lazar-rest.rb b/lib/lazar-rest.rb index 485eb27..c0ea639 100644 --- a/lib/lazar-rest.rb +++ b/lib/lazar-rest.rb @@ -26,6 +26,7 @@ end "api.rb", "compound.rb", "dataset.rb", + "feature.rb", "model.rb", "substance.rb", "validation.rb" |