You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As with filtering, the OpenStack approach appears to be the most user-friendly and explicit, as it strikes the best balance between extensibility and familiarity.
Example
Distance from location.geo
sort=location.geo:nearest
startDate
sort=startDate:asc
orders[0].price (low to high, high to low)
sort=offers.price:asc (allows the implementation to flex to take intro account multiple offers and multiple currencies)
sort=offers.price:desc (allows the implementation to flex to take intro account multiple offers and multiple currencies)
The text was updated successfully, but these errors were encountered:
@nickevansuk considering the current state of #1 (comment), it looks to me as if the only syntax that would be allowable within that grammar is:
sort=subEvent.startDate,asc
sort=location.geo,nearest
sort=offers.price,desc
Something like sort[desc]=offers.price would be hard to describe for an API specification as the conditional that sort[desc] and sort[asc] cannot both be present in the query params. Requiring one and only one use of sort=, however, is easy to describe in e.g. OpenAPI/Swagger
Use Case
When returning information relating to sessions or facilities, there are several common sorts:
References
sort=key1:asc,key2:desc,key3:asc
- OpenStacksort_by=-last_modified,+email
- Moesif, Haufe-Lexware, Zalandosort=foo,bar desc
- Google, Microsoft, ODatasort_by=desc(last_modified),asc(email)
- Moesif()
pattern not used elsewheresort=rating,reviews,name&desc=rating,reviews
- Octosort=date_of_birth|asc,zip_code|desc
- PayPal|
character not used elsewhereProposal
As with filtering, the OpenStack approach appears to be the most user-friendly and explicit, as it strikes the best balance between extensibility and familiarity.
Example
sort=location.geo:nearest
sort=startDate:asc
sort=offers.price:asc
(allows the implementation to flex to take intro account multiple offers and multiple currencies)sort=offers.price:desc
(allows the implementation to flex to take intro account multiple offers and multiple currencies)The text was updated successfully, but these errors were encountered: