-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
templates and agreement partial fetch and pagination #15
Comments
As a starting point for a suggested way to improve the partial fetching options and searching we could consider the following options. Partial selection of template and agreement nested resourcesIf there nested resources (e.g., metadata, clauses, agreement data), represent them in a hierarchy beneath the primary resource ID
The paths above should consider versioning of the templates and agreement too so potentially adding:
A possible extension could be retrieval could be:
PaginationCommon query parameters for pagination are:
Include pagination metadata in responses:
Pagination linksConsider returning next, prev, first, and last links in the response body. This makes it easier for clients to navigate collections:
|
Signed-off-by: Chibuezem Marvinrose <[email protected]>
Hi @niallroche I sent a pr that successfully resolves this issue. |
Fixes accordproject#15 Implement pagination and partial fetching for the `listTemplates` operation. * **client/typescript/apap.ts** - Add `offset`, `limit`, and `fields` query parameters to `listTemplates` operation. - Update `listTemplates` response to include pagination metadata. - Update `listTemplates` response to include pagination links. * **server/index.ts** - Add support for `offset`, `limit`, and `fields` query parameters in `listTemplates` operation. - Update `listTemplates` response to include pagination metadata. - Update `listTemplates` response to include pagination links. * **README.md** - Update documentation to include information about pagination and partial fetching options in `listTemplates` operation. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/accordproject/apap/issues/15?shareId=XXXX-XXXX-XXXX-XXXX).
The fetch of a list of templates returns a list of all templates, this could lead to a very large response. Is there an alternative pattern we could use where the list of template names is fetched and then individual fetch template requests can be made? I am worried about the size of the response for large templates and unnecessary response overhead. Another possibility would be a param supplied to the request to indicate if a full list of templates would be returned or just a list of ids. If a full list is returned maybe there could be a max size/number of responses returned or it maybe it could be paginated. Perhaps a list of just the template metadata is a good compromise too.
The text was updated successfully, but these errors were encountered: