Skip to content

Commit

Permalink
fix(countryByIP): deprecated parameter (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphi committed Sep 18, 2023
1 parent fd26aa0 commit b3ac072
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ paths:
It will return results around `coordinates` (if provided) and the best matching textual relevance.
**It is highly recommended** to set the `countries` parameter with the country you need results from for the best accuracy and revelance possible.
If your use case allows your users to search in any country, then you should ommit `countries` parameter and let the API defines the user's country by its IP.
To have the best location accuracy, you should set `coordinates` based on your users' position.
operationId: ForwardGeocoding
tags: [ Geocoding ]
requestBody:
Expand All @@ -43,8 +47,6 @@ paths:
content:
application/json:
schema:
required:
- countries
allOf:
- $ref: '#/components/schemas/parameters.query'
- $ref: '#/components/schemas/parameters'
Expand Down Expand Up @@ -88,7 +90,8 @@ paths:
description: |
Performs a reverse geocoding search.
It will return the closest results around `coordinates`.\
It will return the closest results around `coordinates`.
If `coordinates` are not set, it will use the user's IP to approximate its coordinates but results will be less accurate (city level accuracy instead of street level accuracy).
operationId: ReverseGeocoding
tags: [ Geocoding ]
Expand All @@ -98,8 +101,6 @@ paths:
content:
application/json:
schema:
required:
- countries
allOf:
- $ref: '#/components/schemas/parameters'
- $ref: '#/components/schemas/parameters.countryByIP'
Expand Down Expand Up @@ -524,7 +525,8 @@ components:
description: |
Array of [two-letter ISO 3166-1 alpha-2 country codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).\
Limit the results to given countries.\
Select only one country for the best results.
Select only one country for the best results.\
If not set, the API automatically selects the user's country defined by its IP.
example: ['fr']
items:
type: string
Expand All @@ -541,7 +543,6 @@ components:
Select the types of record to return.\
Prepend with `-` to omit a type.\
Returns all types by default.
> Note: when the only type selected is `country`, `countries` parameter is optional.
items:
$ref: '#/components/schemas/types'
maxResults:
Expand All @@ -557,6 +558,7 @@ components:
Used to improve relevancy of results around the given area.
example: 48.873662, 2.295063
countryByIP:
deprecated: true
type: boolean
default: false
description: |
Expand All @@ -565,8 +567,10 @@ components:
If set to `true`, the parameter `countries` acts as a fallback.
parameters.countryByIP:
type: object
deprecated: true
properties:
countryByIP:
deprecated: true
type: boolean
default: true
description: |
Expand Down

0 comments on commit b3ac072

Please sign in to comment.