Koha/api/v1/swagger/parameters.json
Tomas Cohen Arazi 0718416ff1 Bug 16497: (follow-up) Adapt to existing guidelines and RFC
This patch makes the original implementation match what is specified on
the RFC [1].

The controller is updated, and so the tests.

To test:
- Apply this patches:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/libraries.t
=> SUCCESS: Tests pass!

[1] https://wiki.koha-community.org/wiki/Libraries_endpoint_RFC

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-19 13:52:14 +00:00

58 lines
1.3 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"
},
"library_id_pp": {
"$ref": "parameters/library.json#/library_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"
}
}