Bug 19410: (follow-up) Add reserved params definitions
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 5 Dec 2017 18:40:56 +0000 (15:40 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Dec 2017 20:46:59 +0000 (17:46 -0300)
This patch re-adds some parameters I left out during some rebasing tasks
and ended up on a separate patchset (bug 18731).

The introduced parameters definitions are only used on endpoint definitions
that implement (at least) pagination. No need to test them here but easier
adding them here than on a patch implementing a new enpoint, which would become
a dependency for other endpoints.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

api/v1/swagger/parameters.json

index b8835d2..1da158c 100644 (file)
   },
   "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"
+   }
 }