From ffc0874b9b5c843a5e1dd7df14ecf11705c6694e Mon Sep 17 00:00:00 2001 From: rautenberg Date: Fri, 26 Jun 2015 11:04:29 +0200 Subject: API: add base routes --- api/validation.json | 131 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 117 insertions(+), 14 deletions(-) diff --git a/api/validation.json b/api/validation.json index d925368..900df8c 100644 --- a/api/validation.json +++ b/api/validation.json @@ -18,16 +18,85 @@ "https" ], "paths": { + "/validation": { + "head": { + "tags": [ + "validation" + ], + "description": "for service check", + "responses": { + "200": { + "$ref": "#/responses/200" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + } + } + }, + "get": { + "tags": [ + "validation" + ], + "description": "Get a list of all validations", + "parameters": [ + { + "name": "accept", + "in": "header", + "description": "requested Content-Type", + "required": true, + "type": "string", + "enum": [ + "text/uri-list", + "text/turtle", + "text/plain", + "text/html", + "application/rdf+xml", + "application/sparql-results+xml" + ] + }, + { + "$ref": "#/parameters/subjectid" + } + ], + "produces": [ + "text/uri-list", + "text/turtle", + "text/plain", + "text/html", + "application/rdf+xml", + "application/sparql-results+xml" + ], + "responses": { + "200": { + "$ref": "#/responses/200" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + } + } + } + }, "/validation/test_set_validation": { "post": { "consumes": [ "application/x-www-form-urlencoded" ], "tags": [ - "test_set_validation" + "validation" ], - "summary": "Validates a model on a test dataset", - "description": "", + "description": "Validates a model on a test dataset", "produces": [ "application/rdf+xml", "application/x-yaml", @@ -36,11 +105,7 @@ ], "parameters": [ { - "name": "subjectid", - "in": "header", - "description": "authorization token", - "required": true, - "type": "string" + "$ref": "#/parameters/subjectid" }, { "name": "model_uri", @@ -73,22 +138,60 @@ ], "responses": { "200": { - "description": "OK - Task URI" + "$ref": "#/responses/200" }, "202": { - "description": "Accepted - Task URI" + "$ref": "#/responses/202" }, "400": { - "description": "Bad Request" + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" }, "404": { - "description": "Not Authorized" + "$ref": "#/responses/404" }, "500": { - "description": "Server Error" + "$ref": "#/responses/500" } } } } - } + }, + "parameters": { + "subjectid": { + "name": "subjectid", + "in": "header", + "description": "authorization token", + "required": true, + "type": "string" + } + }, + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Resource Not Found" + }, + "500": { + "description": "Server Error" + } + }, + "tags": [ + { + "name": "validation", + "description": "Validation service" + } + ] } \ No newline at end of file -- cgit v1.2.3