Skip to content

Commit 82d7dcf

Browse files
authored
fix(specs): allow JSON array for aroundPrecision (#1855)
1 parent 18aefb9 commit 82d7dcf

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

specs/common/schemas/SearchParams.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,7 @@ baseSearchParamsWithoutQuery:
105105
aroundRadius:
106106
$ref: '#/aroundRadius'
107107
aroundPrecision:
108-
type: integer
109-
description: Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/).
110-
default: 10
111-
x-categories:
112-
- Geo-Search
108+
$ref: '#/aroundPrecision'
113109
minimumAroundRadius:
114110
type: integer
115111
description: Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.
@@ -232,6 +228,26 @@ aroundRadius:
232228
x-categories:
233229
- Geo-Search
234230

231+
aroundPrecision:
232+
description: Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/).
233+
oneOf:
234+
- type: integer
235+
default: 10
236+
- $ref: '#/aroundPrecisionFromValue'
237+
x-categories:
238+
- Geo-Search
239+
240+
aroundPrecisionFromValue:
241+
description: Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/).
242+
type: array
243+
items:
244+
type: object
245+
properties:
246+
from:
247+
type: integer
248+
value:
249+
type: integer
250+
235251
aroundRadiusAll:
236252
type: string
237253
enum: [all]

0 commit comments

Comments
 (0)