Skip to content
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 #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Marvinrose
Copy link

Fixes #15 by addressing large response concerns for GET /templates and GET /agreements:

  • Added Pagination: Both endpoints support offset and limit (capped at 100 server-side), with meta (total, offset, limit) and links (self, next, prev, first, last) in the response

  • Implemented fields param for Partial Fetching: The fields query param (e.g., ?fields=id,name) allows clients to fetch specific fields, supporting the alternative pattern of listing IDs/names followed by individual requests (e.g., GET /templates/{name}).

  • Added full param to toggle full objects (e.g., ?full=true).

  • Updated openapi.json to document these params, removed limit maximum to allow server-side capping.

  • Tested with Postman to confirm functionality.

Signed-off-by: Chibuezem Marvinrose <[email protected]>
Signed-off-by: Chibuezem Marvinrose <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

templates and agreement partial fetch and pagination
1 participant