From 8459c37ef66d513fe05c3cc766ad1029c1751b46 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 8 May 2020 15:59:29 +0300 Subject: [PATCH] Add swagger spec for global labels method (and fix up some descriptions) --- swagger.json | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/swagger.json b/swagger.json index 2e936e737..3d564bb1a 100644 --- a/swagger.json +++ b/swagger.json @@ -143,6 +143,47 @@ ] } }, + "/label": { + "get": { + "summary": "List of labels for the requested concept", + "parameters": [ + { + "name": "uri", + "in": "query", + "description": "URI of the concept whose labels to return", + "required": true, + "type": "string" + }, + { + "name": "lang", + "in": "query", + "description": "search language, e.g. \"en\" or \"fi\"", + "required": false, + "type": "string" + } + ], + "produces": [ + "application/ld+json" + ], + "responses": { + "200": { + "description": "labels for the requested concept", + "schema": { + "$ref": "#/definitions/LabelsAndUri" + } + }, + "304": { + "description": "the resource was not modified, so there is no need to retransmit the requested resources" + }, + "404": { + "description": "no concept could be found with the requested URI" + } + }, + "tags": [ + "Global methods" + ] + } + }, "/data": { "get": { "summary": "RDF data of the requested concept", @@ -717,7 +758,7 @@ { "name": "uri", "in": "query", - "description": "URI of the concept whose label to return", + "description": "URI of the concept whose labels to return", "required": true, "type": "string" }, @@ -734,7 +775,7 @@ ], "responses": { "200": { - "description": "preferred label for the requested concept", + "description": "labels for the requested concept", "schema": { "$ref": "#/definitions/LabelsAndUri" } @@ -2232,4 +2273,4 @@ ] } } -} +} \ No newline at end of file