From 3f356df3ce0a2f2e27610d65c3e8fe260ac239a8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 19 Mar 2020 17:03:53 -0300 Subject: [PATCH] Bug 24909: Route spec Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind Signed-off-by: Jonathan Druart --- api/v1/swagger/paths.json | 3 ++ api/v1/swagger/paths/biblios.json | 65 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/api/v1/swagger/paths.json b/api/v1/swagger/paths.json index 0631ecb53b..1e4ec4a934 100644 --- a/api/v1/swagger/paths.json +++ b/api/v1/swagger/paths.json @@ -95,6 +95,9 @@ "/rotas/{rota_id}/stages/{stage_id}/position": { "$ref": "paths/rotas.json#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position" }, + "/public/biblios/{biblio_id}": { + "$ref": "paths/biblios.json#/~1public~1biblios~1{biblio_id}" + }, "/public/patrons/{patron_id}/password": { "$ref": "paths/public_patrons.json#/~1public~1patrons~1{patron_id}~1password" }, diff --git a/api/v1/swagger/paths/biblios.json b/api/v1/swagger/paths/biblios.json index b2bb58a6ce..530993ff33 100644 --- a/api/v1/swagger/paths/biblios.json +++ b/api/v1/swagger/paths/biblios.json @@ -132,5 +132,70 @@ } } } + }, + "/public/biblios/{biblio_id}": { + "get": { + "x-mojo-to": "Biblios#get_public", + "operationId": "getBiblioPublic", + "tags": [ + "biblios" + ], + "parameters": [ + { + "$ref": "../parameters.json#/biblio_id_pp" + } + ], + "produces": [ + "application/marcxml+xml", + "application/marc-in-json", + "application/marc", + "text/plain" + ], + "responses": { + "200": { + "description": "A biblio" + }, + "401": { + "description": "Authentication required", + "schema": { + "$ref": "../definitions.json#/error" + } + }, + "403": { + "description": "Access forbidden", + "schema": { + "$ref": "../definitions.json#/error" + } + }, + "404": { + "description": "Biblio not found", + "schema": { + "$ref": "../definitions.json#/error" + } + }, + "406": { + "description": "Not acceptable", + "schema": { + "type": "array", + "description": "Accepted content-types", + "items": { + "type": "string" + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "../definitions.json#/error" + } + }, + "503": { + "description": "Under maintenance", + "schema": { + "$ref": "../definitions.json#/error" + } + } + } + } } } -- 2.20.1