Closed Mortinke closed 5 years ago
With #31 we have now the following behavior:
offset
and limit
in the schema (with rest-schemagen)
{
"href": "<api-path>/<listing-path>?offset=0&limit=20",
"schema": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 0
},
"offset": {
"type": "integer",
"minimum": 0
}
}
},
offset
or limit
is negative
{
"type": "https://developers.unite.eu/errors/invalid-query-param",
"status": 400,
"title": "Invalid Query Parameter",
"detail": "The filter query is not valid.",
"errors": [
{
"code": "MINLENGTH",
"path": "#/offset",
"limit": 0
}
]
}
to avoid Exceptions like
org.springframework.dao.InvalidDataAccessApiUsageException: max-results cannot be negative
, we can add a validation forlimit
andoffset