Current Pagination for our core-api endpoints is hardcoded in ext.ts and is not exposed outside of core-api, so that it can be used by plugins.
Expected Behavior
Expose a method that will enable new plugins to register additional routes that require pagination. This can be done when we are registering new api endpoints within the service-provider.ts while a plugin is being loaded.
Current Behaviour
If the endpoints are not registered as paginated, the meta information is not added to API responses.
When registering new endpoints (via plugins), the paginated ones don’t get served in a standard core way with metadata and other info, that is added if the endpoint is listed in ext.ts (registered as paginated endpoint).
Possible Solution
Expose a method that will make it possible to register additional paginated routes when the custom plugins are loaded. A possible way could be via await this.app.get<Server>(identifier).register({ method to add arguments for paginated routes.
Current Pagination for our
core-api
endpoints is hardcoded inext.ts
and is not exposed outside ofcore-api
, so that it can be used by plugins.Expected Behavior
Expose a method that will enable new plugins to register additional routes that require pagination. This can be done when we are registering new
api
endpoints within theservice-provider.ts
while a plugin is being loaded.Current Behaviour
If the endpoints are not registered as
paginated
, themeta
information is not added to API responses.When registering new endpoints (via plugins), the paginated ones don’t get served in a standard core way with metadata and other info, that is added if the endpoint is listed in
ext.ts
(registered as paginated endpoint).Possible Solution
Expose a method that will make it possible to register additional
paginated
routes when the custom plugins are loaded. A possible way could be viaawait this.app.get<Server>(identifier).register({
method to add arguments for paginated routes.https://github.com/ArkEcosystem/core/blob/develop/packages/core-api/src/plugins/pagination/ext.ts#L14-L43
from service-provider.ts
Your Environment
core-v3 / latest develop branch