diff options
author | rautenberg <rautenberg@in-silico.ch> | 2015-06-25 15:16:16 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2015-06-25 15:16:16 +0200 |
commit | edb0bf55c64c0718574b43a1c5d83dcebc0aa27a (patch) | |
tree | e485bd35240f99a71c1f188dd09e4eb1049f7b97 | |
parent | 89d07c6e7db0f37d1e1f958d49257f8ea31c3bde (diff) |
API: refine API
-rw-r--r-- | api/compound.json | 57 |
1 files changed, 42 insertions, 15 deletions
diff --git a/api/compound.json b/api/compound.json index f4a1c82..bfd81a2 100644 --- a/api/compound.json +++ b/api/compound.json @@ -18,10 +18,10 @@ "description": "for service check", "responses": { "200": { - "description": "OK" + "$ref": "#/responses/200" }, "503": { - "description": "Service Unavailable" + "$ref": "#/responses/503" } } } @@ -34,11 +34,7 @@ "description": "Get compound representation", "parameters": [ { - "name": "InChI", - "in": "path", - "description": "InChI String", - "required": true, - "type": "string" + "$ref": "#/parameters/InChI" }, { "name": "accept", @@ -82,11 +78,7 @@ "description": "Get compound representation", "parameters": [ { - "name": "InChI", - "in": "path", - "description": "InChI String", - "required": true, - "type": "string" + "$ref": "#/parameters/InChI" } ], "produces": [ @@ -94,10 +86,45 @@ ], "responses": { "200": { - "description": "OK" + "$ref": "#/responses/200" + }, + "400": { + "$ref": "#/responses/400" + }, + "404": { + "$ref": "#/responses/404" } } } } - } -} + }, + "parameters": { + "InChI": { + "name": "InChI", + "in": "path", + "description": "InChI String", + "required": true, + "type": "string" + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Resource Not Found" + }, + "503": { + "description": "Service Unavailable" + } + }, + "tags": [ + { + "name": "compound", + "description": "Compound service" + } + ] +}
\ No newline at end of file |