Bug 24909: Route spec
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 19 Mar 2020 20:03:53 +0000 (17:03 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 27 Apr 2020 10:15:10 +0000 (11:15 +0100)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

api/v1/swagger/paths.json
api/v1/swagger/paths/biblios.json

index 0631ecb..1e4ec4a 100644 (file)
@@ -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"
   },
index b2bb58a..530993f 100644 (file)
         }
       }
     }
+  },
+  "/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"
+          }
+        }
+      }
+    }
   }
 }