From 4d2684be52de111ccde150f2d2192a53d341cba7 Mon Sep 17 00:00:00 2001
From: Alejandro Celaya <alejandro@alejandrocelaya.com>
Date: Wed, 28 Nov 2018 20:46:52 +0100
Subject: [PATCH] Updated swagger docs for visits including everything related
 to pagination

---
 .../v1_short-urls_{shortCode}_visits.json     | 30 ++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/docs/swagger/paths/v1_short-urls_{shortCode}_visits.json b/docs/swagger/paths/v1_short-urls_{shortCode}_visits.json
index acae7155..a3cf5f10 100644
--- a/docs/swagger/paths/v1_short-urls_{shortCode}_visits.json
+++ b/docs/swagger/paths/v1_short-urls_{shortCode}_visits.json
@@ -33,6 +33,24 @@
                 "schema": {
                     "type": "string"
                 }
+            },
+            {
+                "name": "page",
+                "in": "query",
+                "description": "The page to display. Defaults to 1",
+                "required": false,
+                "schema": {
+                    "type": "number"
+                }
+            },
+            {
+                "name": "itemsPerPage",
+                "in": "query",
+                "description": "The amount of items to return on every page. Defaults to all the items",
+                "required": false,
+                "schema": {
+                    "type": "number"
+                }
             }
         ],
         "security": [
@@ -59,6 +77,9 @@
                                             "items": {
                                                 "$ref": "../definitions/Visit.json"
                                             }
+                                        },
+                                        "pagination": {
+                                            "$ref": "../definitions/Pagination.json"
                                         }
                                     }
                                 }
@@ -96,7 +117,14 @@
                                     "userAgent": "some_web_crawler/1.4",
                                     "visitLocation": null
                                 }
-                            ]
+                            ],
+                            "pagination": {
+                                "currentPage": 5,
+                                "pagesCount": 12,
+                                "itemsPerPage": 10,
+                                "itemsInCurrentPage": 10,
+                                "totalItems": 115
+                            }
                         }
                     }
                 }