Description
Wrong pagination info is returned by http://localhost:8080/resource/api/vendors?page=0&page_entries=10&searchText=xyz endpoint.
When searchText is added as a param, the number of entries returned and the pagination info is not in sync.
Example Response:
{
"_embedded" : {
"sw360:vendors" : [ {
"type" : "vendor",
"url" : "https://github.com",
"shortName" : "xyz",
"fullName" : "XYZ XYZ",
"_links" : {
"self" : {
"href" : "http://localhost:8080/resource/api/vendors/7381725457c70d6fcff254419e008629"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/resource/api/vendors?page=0&page_entries=10"
},
"next" : {
"href" : "http://localhost:8080/resource/api/vendors?page=1&page_entries=10"
},
"last" : {
"href" : "http://localhost:8080/resource/api/vendors?page=1&page_entries=10"
},
"curies" : [ {
"name" : "sw360",
"href" : "http://localhost:8080/resource/docs/{rel}.html",
"templated" : true
} ]
},
"page" : {
"size" : 10,
"totalElements" : 11,
"totalPages" : 2,
"number" : 0
}
}
totalPages and totalElements are not in sync with the number of entries, in this case, both totalElements and totalPages should 1.
Description
Wrong pagination info is returned by
http://localhost:8080/resource/api/vendors?page=0&page_entries=10&searchText=xyzendpoint.When
searchTextis added as a param, the number of entries returned and the pagination info is not in sync.Example Response:
totalPagesandtotalElementsare not in sync with the number of entries, in this case, bothtotalElementsandtotalPagesshould 1.