summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrautenberg <rautenberg@in-silico.ch>2016-09-02 11:16:30 +0200
committerrautenberg <rautenberg@in-silico.ch>2016-09-02 11:16:30 +0200
commit92b97c9a5de643c69a72aa955f1b991b6cf8d296 (patch)
tree7e1b75db89c0aa98122e6d5c2ec46f8c95647e77
parent4edf9811fbdc500ecc8195d6624455218818c33f (diff)
add feature route
-rw-r--r--README.md1
-rw-r--r--api/api.json89
-rw-r--r--lib/lazar-rest.rb1
3 files changed, 91 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6c7cacf..2aa04b6 100644
--- a/README.md
+++ b/README.md
@@ -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"