snyk-labs / pysnyk

A Python client for the Snyk API.
https://snyk.docs.apiary.io/
MIT License
85 stars 116 forks source link

fix: #212 rest pagination validation #213

Closed IanYoung-BO closed 8 months ago

IanYoung-BO commented 8 months ago

Initially reported in #212

This PR adds additional validation to the data returned from paginated REST endpoints. In some cases, the server will return pages of zero length, or the next link value will be the same page. This may be due to incomplete implementations of beta endpoints. However, these additional checks will allow for use of more endpoints that are available.

garethr commented 8 months ago

Thanks, I've fixed up a formatting issue and merged in https://github.com/snyk-labs/pysnyk/commit/47ce10a784d01477f95435c9c30a4127ed61c292. Much appreciated.