Tomas Cohen Arazi
62dcfa95da
This patch fixes the required permissions defined on the spec for the mentioned endpoint. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail due to badly defined permissions 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! Notice parameters: edit_catelogue didn't exist 5. Sign off :-D Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
136 lines
3.1 KiB
JSON
136 lines
3.1 KiB
JSON
{
|
|
"/biblios/{biblio_id}": {
|
|
"get": {
|
|
"x-mojo-to": "Biblios#get",
|
|
"operationId": "getBiblio",
|
|
"tags": [
|
|
"biblios"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "../parameters.json#/biblio_id_pp"
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json",
|
|
"application/marcxml+xml",
|
|
"application/marc-in-json",
|
|
"application/marc"
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"x-koha-authorization": {
|
|
"permissions": {
|
|
"catalogue": "1"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"x-mojo-to": "Biblios#delete",
|
|
"operationId": "deleteBiblio",
|
|
"tags": [
|
|
"biblios"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "../parameters.json#/biblio_id_pp"
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Biblio deleted",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Unable to perform action on biblio",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "Under maintenance",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
}
|
|
},
|
|
"x-koha-authorization": {
|
|
"permissions": {
|
|
"editcatalogue": "edit_catalogue"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|