Koha/api/v1/swagger.json
Martin Renvoize d59b4596d5 Bug 15126: x-mojo-controller deprecation
Remove the use of soon to be deprecated x-mojo-controller from our
specification and replace with the recommended operationId format.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 13:52:14 +00:00

90 lines
2 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "Koha REST API",
"version": "1",
"license": {
"name": "GPL v3",
"url": "http://www.gnu.org/licenses/gpl.txt"
},
"contact": {
"name": "Koha Team",
"url": "http://koha-community.org/"
}
},
"basePath": "/api/v1",
"paths": {
"/patrons": {
"get": {
"operationId": "listPatrons",
"tags": ["patrons"],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A list of patrons",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/patron"
}
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/patrons/{borrowernumber}": {
"get": {
"operationId": "getPatron",
"tags": ["patrons"],
"parameters": [
{
"$ref": "#/parameters/borrowernumberPathParam"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "A patron",
"schema": {
"$ref": "#/definitions/patron"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "#/definitions/error"
}
},
"404": {
"description": "Patron not found",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
}
},
"definitions": {
"$ref": "./definitions/index.json"
},
"parameters": {
"borrowernumberPathParam": {
"name": "borrowernumber",
"in": "path",
"description": "Internal patron identifier",
"required": true,
"type": "integer"
}
}
}