/
propertiesFieldsQueryParam.yml
32 lines (24 loc) · 1.26 KB
/
propertiesFieldsQueryParam.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: fields
in: query
description: |-
Contains a comma-separated list of fields from the properties to be
included in the returned JSON.
#### Selectable fields
Supports selecting arbitrary sub-fields as defined in the properties by
using a comma-separated list:
* several properties paths can be passed as a comma-separated list of JSON pointers (RFC-6901)
For example:
* `?fields=temperature` would select only `temperature` property value (if present)
* `?fields=temperature,humidity` would select only `temperature` and `humidity` property values (if present)
Supports selecting arbitrary sub-fields of objects by wrapping sub-fields
inside parentheses `( )`:
* a comma-separated list of sub-fields (a sub-field is a JSON pointer (RFC-6901) separated with `/`) to select
* sub-selectors can be used to request only specific sub-fields by placing expressions in parentheses `( )` after a selected subfield
For example:
* `?fields=location(longitude,latitude)` would select the `longitude` and `latitude` value inside the `location` property
#### Examples
* `?fields=temperature,humidity,location(longitude,latitude)`
* `?fields=configuration,status(powerConsumption/watts)`
required: false
schema:
type: string