Set default limit on /access/ to max limit when no pagination limit supplied #214
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a recent PR we removed the default limit on the
/access/
endpoint, to ensure allrecords were returned in a single request instead of using the default of 10.
This meant in order to be backwards compatible, we'd also need to continue supporting
pagination params. To do this, we updated the spec to include
oneOf
two possiblevalid responses, one paginated and one unpaginated. The
data
would remain thesame, but the meta data for pagination would not be included unless a
limit
param was supplied in the request.
The associated updates were made to the
openapi.json
spec, but due to an existingbug/issue in the OpenAPI Generator project [1,2], this breaks some client generation
which is used by app teams and QE, even though it's valid per the spec.
In order to avoid having a separate endpoint explicitly for a paginated responses,
and to also avoid constructing false meta data for pagination, we've decided to
set the default limit on the
/access/
endpoint equal to the max limit numberwhen no
limit
is supplied, but continue to respect thelimit
pagination paramwhen it is supplied.
This will allow for client generation to continue to work, and will allow those
using pagination by default to still be supported. For those not using pagination,
the response
data
should again still be the same, and the default limit will notbe a barrier to hitting pagination, as it will be the same as our max results.
[1] OpenAPITools/openapi-generator#15
[2] OpenAPITools/openapi-generator#1709