Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAC alignment for sortby #380

Open
pvretano opened this issue Aug 5, 2024 · 1 comment
Open

STAC alignment for sortby #380

pvretano opened this issue Aug 5, 2024 · 1 comment
Assignees

Comments

@pvretano
Copy link
Contributor

pvretano commented Aug 5, 2024

See opengeospatial/ogcapi-processes#429 (comment).

The schema of the defaultSortOrder should be aligned with what STAC uses.

@pvretano
Copy link
Contributor Author

pvretano commented Dec 5, 2024

STAC defines the sortBy parameter as:

name: sortby
in: query
description: |-
        **Extension:** Sort

        An array of property names, prefixed by either "+" for ascending or
        "-" for descending. If no prefix is provided, "+" is assumed.
required: false
schema:
  type: string
  example: '+id,-properties.eo:cloud_cover'
style: form
explode: false

OARec defines the sortBy parameter as:

name: sortby
in: query
description: |-
  Specifies a comma-separated list of property names by which the response shall
  be sorted.  If the property name is preceded by a plus (+) sign it indicates
  an ascending sort for that property.  If the property name is preceded by a
  minus (-) sign it indicates a descending sort for that property.  If the
  property is not preceded by a plus or minus, then the default sort order
  implied is ascending (+).
required: false
schema:
  type: array
  minItems: 1
  items:
    type: string
    pattern: '[+|-]?[A-Za-z_].*'
explode: false
style: form

These seem equivalent except for the use of pattern in OARec. We should either remove that or loosen it up a little ... perhaps [+|-]?.*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants