Project

General

Profile

Bug #6966

API: sorting should contain a default direction

Added by Walden Raines about 5 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

If you do not specify a direction when using the order parameter you will receive the following error message:

{"displayMessage":"Cannot sort by ''","errors":["Cannot sort by ''"]}

We should default to DESC if no direction is supplied.

Steps to Reproduce

1. Hit an index URL with ordering such as /katello/api/v2/products?order=name&organization_id=1
2. Notice above error message

History

#1 Updated by Eric Helms almost 5 years ago

  • Target version changed from 55 to 56

#2 Updated by Eric Helms almost 5 years ago

  • Target version deleted (56)

#3 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 86

#4 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) changed from 86 to 114

Also available in: Atom PDF