Alfresco / rest-api-explorer

Public REST API Explorer
Apache License 2.0
36 stars 25 forks source link

Missing pagination support for listSourceAssociations and listTargetAssociations #192

Closed saidone75 closed 1 year ago

saidone75 commented 1 year ago

Hello,

I've found that skipCountParam and maxItemsParam are missing from listSourceAssociations and listTargetAssociations. This seem to also affect the Java REST API https://github.com/Alfresco/alfresco-java-sdk making impractical to fetch associations in excess of the first 100.

Thanks, Marco

tpage-alfresco commented 1 year ago

I think this is just documentation missing from the API explorer. Using maxItems and skipCount seems to work fine for me with the /nodes/{nodeId}/targets and /nodes/{nodeId}/sources endpoints - e.g. I tested with

http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/c9b6bff7-7d9d-4777-93a2-e6ab67955e29/sources?maxItems=25&skipCount=125
saidone75 commented 1 year ago

Hi Tom,

looks like it's missing from the YAML definition:

https://github.com/saidone75/rest-api-explorer/commit/e0fb5408adb6e55433f207d9a835b3503f11f24f

and so on the generated Java API SDK.

I opened a support case for that (cannot access right now, sorry) and made a PoC: https://github.com/saidone75/alfresco-node-processor/blob/support-cases/00856531/src/test/java/org/saidone/SupportCasesIntegrationTests.java

Thanks, Marco

tpage-alfresco commented 1 year ago

I created the PR for this here: https://github.com/Alfresco/rest-api-explorer/pull/199

I realised afterwards that you made an identical commit, and if you'd made a PR (and signed the contribution agreement) we could have accepted it. Sorry - I should have made that more clear.

Thanks for your help raising and investigating this issue!