vertical-knowledge / ripozo

A tool for quickly creating REST/HATEOAS/Hypermedia APIs in python
http://ripozo.readthedocs.org/
GNU General Public License v2.0
201 stars 22 forks source link

Nav links for next/previous pages do not contain applied filters #64

Open hroncok opened 8 years ago

hroncok commented 8 years ago

When I do the following query (count is not necessary to reproduce):

GET /courses/?day=5&count=1

Actual result:

{
    "_embedded": {},
    "_links": {
        "courses": [
            {
                "href": "/courses/276"
            }
        ],
        "next": {
            "href": "/courses?page=2&count=1"      <----HERE
        },
        "self": {
            "href": "http://127.0.0.1:5000/courses?day=5"
        }
    },
    "count": [
        "1"
    ],
    "day": 5
}

Expected result:

{
    "_embedded": {},
    "_links": {
        "courses": [
            {
                "href": "/courses/276"
            }
        ],
        "next": {
            "href": "/courses?day=5&page=2&count=1"      <----HERE
        },
        "self": {
            "href": "http://127.0.0.1:5000/courses?day=5"
        }
    },
    "count": [
        "1"
    ],
    "day": 5
}