algolia / algoliasearch-client-swift

⚑️ A fully-featured and blazing-fast Swift API client to interact with Algolia.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SearchResponse's automaticRadius is wrong type

TateB opened this issue Β· comments

commented

Describe the bug πŸ›
Within the SearchResponse struct, the automaticRadius is set to a double, while the JSON response actually has it set to a string. Could be very easily fixed switching the double back to a string.

To Reproduce πŸ”
Steps to reproduce the behavior:

  1. Send a query with aroundLatLng or aroundLatLngViaIP enabled
  2. Parse query response through SearchResponse struct
  3. An error will occur, trying to convert automaticRadius String to the expected Double

Expected behavior πŸ’­
The SearchResponse parses correctly without error.

Environment:

  • OS: iOS
  • Version 14.0

Hi @TateB ,

Thanks a lot for pointing this.
A fix will arrive soon πŸ”§