Description
The sort param sortType is not considered if sortBy is not passed in the query-param. Please consider following case:
- The GET API /service/gds/dataset has default sortType=asc and sortBy=datasetId.
- Please find the query-param input and actual responses received:
Request - sortBy | Request - sortType | Response - sortBy | Response - sortType |
---|---|---|---|
Not passed | Not passed | datasetId | asc |
datasetName | Not passed | datasetName | asc |
datasetName | desc | datasetName | desc |
Not passed | desc | datasetId | asc |
datasetId | desc | datasetId | desc |
As noticed above if the sortBy is not passed in the request query-param sortType param is not considered.
Patch in review - https://reviews.apache.org/r/74725/