Skip to content

Add view property for handling pagination#259

Merged
PonteIneptique merged 3 commits intodistributed-text-services:masterfrom
monotasker:IanScott-typoFixes
Aug 8, 2024
Merged

Add view property for handling pagination#259
PonteIneptique merged 3 commits intodistributed-text-services:masterfrom
monotasker:IanScott-typoFixes

Conversation

@monotasker
Copy link
Copy Markdown
Collaborator

Add a view property to returned Navigation and Collection/Resource objects if the response is paginated. Added PartialCollectionView and PartialNavigationView object types for the values of the view property.

NB: This PR is cumulative depending on the previous PR harmonizing the Resource object properties.

…Adds the required `view` property for paginated responses and introducing the `PartialCollectionView` and `PartialNavigationView` objects to describe the pagination.
@PonteIneptique
Copy link
Copy Markdown
Member

@monotasker Is there any reason to duplicate the type of views ? They have the same props :)

@monotasker
Copy link
Copy Markdown
Collaborator Author

I don't really see one, no. We had a type in our example that was named specifically for collections, and I just didn't think about changing the type name to make it more generic :D Shall I amalgamate the two types with something like PartialResultsView as the type?

@PonteIneptique
Copy link
Copy Markdown
Member

PaginationObject would be clear enough no ?

@monotasker
Copy link
Copy Markdown
Collaborator Author

monotasker commented Aug 7, 2024 via email

@PonteIneptique
Copy link
Copy Markdown
Member

PonteIneptique commented Aug 7, 2024 via email

@monotasker
Copy link
Copy Markdown
Collaborator Author

Done. The two new types have been amalgamated as one Pagination type. I left a list of its properties on both endpoints for convenience, but highlighted on Navigation that the definition is reapeated from Collection (with a link).

@PonteIneptique PonteIneptique merged commit 1a58a04 into distributed-text-services:master Aug 8, 2024
@monotasker monotasker deleted the IanScott-typoFixes branch August 8, 2024 14:43
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.

2 participants