Skip to content

Releases: KazaiMazai/vapor-rest-kit

v2.2.0

23 Jun 18:00
79a00bb
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.1.0...2.2.0

v2.1.0

27 Mar 16:15
8784127
Compare
Choose a tag to compare

This release brings support for bi-directional pagination.

Bi-directional pagination is disabled by default. It can be turned on in pagination config:

//defalut parameters are limitMax: 25, defaultLimit: 10

let cursorPaginationConfig = CursorPaginationConfig(limitMax: 25, defaultLimit: 10, allowBackwardPagination: true)

When enabled, cursor page API response metadata would contain both next and previous cursors.

{
   "items": [
      //your data collection here
   ],
   
   "metadata": {
     "next_cursor": "W3siZmllbGRLZXkiOiJhc3NldHNfW3RpY2tlcl0iLCJ2",
     "prev_cursor": "dW3siZmllbGRLZXkiOiJhc3NldHNf2312RpY2tlcl0i3"
      
   }
}

They can be used with after and beforequery parameters to request next and previous portions of collection.

Next portion:

https://api.yourservice.com/v1/stars?limit=10&after=W3siZmllbGRLZXkiOiJhc3NldHNfW3RpY2tlcl0iLCJ2YWx1Z...

Previous portion:

https://api.yourservice.com/v1/stars?limit=10&before=W3siZmllbGRLZXkiOiJhc3NldHNfW3RpY2tlcl0iLCJ2YWx1Z...

v2.0.2

26 Mar 00:48
46a7c36
Compare
Choose a tag to compare

Fixed cursor pagination coding keys issue related to changes in Fluent model field paths

What's Changed

Full Changelog: 2.0.0...2.0.2

v2.0.1

22 Nov 10:56
Compare
Choose a tag to compare

Vapor dependency version fixed

v2.0.0

22 Nov 08:18
Compare
Choose a tag to compare

Massive update of both internals and API.

Check out the docs as well as migration guide for more details.

v1.0.0

25 Sep 14:37
Compare
Choose a tag to compare