Koha/api/v1/swagger/parameters.json
Tomas Cohen Arazi a7e46047cf Bug 19784: Adapt /v1/patrons to new naming guidelines
This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well. 'borrowernumber'
handling is kept until the existing endpoints get updated.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-29 11:42:08 -03:00

55 lines
1.2 KiB
JSON

{
"patron_id_pp": {
"$ref": "parameters/patron.json#/patron_id_pp"
},
"patron_id_qp": {
"$ref": "parameters/patron.json#/patron_id_qp"
},
"city_id_pp": {
"$ref": "parameters/city.json#/city_id_pp"
},
"holdIdPathParam": {
"$ref": "parameters/hold.json#/holdIdPathParam"
},
"vendoridPathParam": {
"$ref": "parameters/vendor.json#/vendoridPathParam"
},
"match": {
"name": "_match",
"in": "query",
"required": false,
"description": "Matching criteria",
"type": "string",
"enum": [
"contains",
"exact",
"starts_with",
"ends_with"
]
},
"order_by": {
"name": "_order_by",
"in": "query",
"required": false,
"description": "Sorting criteria",
"type": "array",
"collectionFormat": "pipes",
"items": {
"type": "string"
}
},
"page": {
"name": "_page",
"in": "query",
"required": false,
"description": "Page number, for paginated object listing",
"type": "integer"
},
"per_page": {
"name": "_per_page",
"in": "query",
"required": false,
"description": "Page size, for paginated object listing",
"type": "integer"
}
}