Skip to content

Commit

Permalink
refactor: update query filter example
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin committed Oct 17, 2023
1 parent c1f7a26 commit 9ab05c3
Showing 1 changed file with 38 additions and 19 deletions.
57 changes: 38 additions & 19 deletions eodag/resources/stac_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -584,29 +584,41 @@ components:
$ref: '#/components/schemas/collectionsArray'
explode: false
schemas:
queryProp:
description: Apply query operations to a specific property
anyOf:
- description: if the object doesn't contain any of the operators, it is equivalent to using the equals operator
- type: object
description: Match using an operator
properties:
lte:
description: |-
Find items with a property value less than or equal the specified value.
In EODAG, only `eo:cloud_cover` supports this operator.
oneOf:
- type: string
format: date-time
- type: number
eq:
description: |-
Find items with a property that is equal to the specified value.
For strings, a case-insensitive comparison must be performed.
In EODAG, this operator is implemented for all parameters but `eo:cloud_cover`
nullable: true
oneOf:
- type: string
- type: number
- type: boolean
query:
type: object
description: Define which properties to query and the operations to apply
description: Define which parameters are queryable and the operators associated with each
additionalProperties:
$ref: '#/components/schemas/queryProp'
example:
eo:cloud_cover:
gt: 8
lt: 50
platform:
eq: 'landsat-8'
datetime:
gte: '2018-02-12T00:00:00Z'
lte: '2018-03-18T12:31:12Z'
pl:item_type:
startsWith: PSScene
product:
in:
- foo
- bar
- baz
eo:gsd:
in:
- 10
- 20
eq: landsat-8
eo:cloud_cover:
lte: 50
collection:
type: object
required:
Expand Down Expand Up @@ -1410,6 +1422,7 @@ components:
- $ref: '#/components/schemas/collectionsFilter'
- $ref: '#/components/schemas/idsFilter'
- $ref: '#/components/schemas/limitFilter'
- $ref: '#/components/schemas/queryFilter'
limit:
type: integer
minimum: 1
Expand Down Expand Up @@ -1510,6 +1523,12 @@ components:
properties:
collections:
$ref: '#/components/schemas/collectionsArray'
queryFilter:
description: An object representing a query filter.
type: object
properties:
query:
$ref: '#/components/schemas/query'
datetime:
type: string
description: |-
Expand Down

0 comments on commit 9ab05c3

Please sign in to comment.