Currently Orion as a Context Provider is returning default 20 entities in case of registration with idPattern. Please provide your opinion whether the default 20 entities are hardcoded for context provider? If so, Can you please share the code location, from where provider is returning default 20 entities irrespective of limit in API request.
I have followed below steps:
"idPattern": ".*"
curl -X GET 'localhost:1026/v2/entities?idPattern=.*&type=T&limit=6'
Getting default 20 entities from CP even requested limit is only 6.
Below is the current scenario in Fiware-Orion (on 04th Jan 2023):
limit
variable is being set in mongoQueryContext.cpp
at L#339 by uriParams
option i.e. URI_PARAM_PAGINATION_LIMIT
variable.
But in case of request forwarding (i.e. context provider), limit is not forwarded with uriParam, so for that reason, default limit value is being assigned to URI_PARAM_PAGINATION_LIMIT
variable in rest.cpp
at L#1347.
And that default value is being used by Limit variable in case of context provider in mongoQueryContext.cpp
at L#339.