Skip to content

Commit

Permalink
Redunant(wrong) direction appended to @PageableDefault. Fixes #2152
Browse files Browse the repository at this point in the history
  • Loading branch information
bnasslahsen committed Mar 26, 2023
1 parent 8415e5e commit ee57e00
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,14 @@ public String getPatientList4(@PageableDefault(100)
@ParameterObject Pageable pageable) {
return "bla";
}

@GetMapping("/test5")
public void read(
@PageableDefault(sort = {
"some,desc",
"other,asc",
"another.that,desc"
})
@ParameterObject final Pageable pageable) {
}
}
54 changes: 54 additions & 0 deletions springdoc-openapi-data-rest/src/test/resources/results/app13.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,60 @@
}
],
"paths": {
"/test5": {
"get": {
"tags": [
"hello-controller"
],
"operationId": "read",
"parameters": [
{
"name": "page",
"in": "query",
"description": "Zero-based page index (0..N)",
"required": false,
"schema": {
"minimum": 0,
"type": "integer",
"default": 0
}
},
{
"name": "size",
"in": "query",
"description": "The size of the page to be returned",
"required": false,
"schema": {
"minimum": 1,
"type": "integer",
"default": 10
}
},
{
"name": "sort",
"in": "query",
"description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"some,desc",
"other,asc",
"another.that,desc"
]
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/test4": {
"get": {
"tags": [
Expand Down

0 comments on commit ee57e00

Please sign in to comment.