Skip to content

Search SDK: Fix bug that prevented infinite double values from deserializing#2849

Merged
bitsforthought merged 1 commit into
Azure:search-3.0.3from
bitsforthought:infinity-fix
Feb 23, 2017
Merged

Search SDK: Fix bug that prevented infinite double values from deserializing#2849
bitsforthought merged 1 commit into
Azure:search-3.0.3from
bitsforthought:infinity-fix

Conversation

@bitsforthought
Copy link
Copy Markdown
Member

Description

Prior to this change, it was impossible to retrieve Double values from Azure Search if they were equal to positive or negative infinity. This is because the SDK was relying on JSON.NET's default behavior, which is to expect "Infinity" or "-Infinity", respectively. However, this is not how these values are serialized according to OData V4. In OData, they are "INF" and "-INF", respectively. To fix this, I added a new DoubleConverter. I also added a bunch of test coverage around boundary values.

Notes: We are not bumping the version yet because there are other changes we need to make first. Also, this is 100% changes to custom code; There are no corresponding Swagger changes.

FYI @chaosrealm @seansaleh @Yahnoosh @mhko

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

SDK Generation Guidelines

  • If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
  • The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as a link to the swagger spec, used to generate the code.
  • The project.json and AssemblyInfo.cs files have been updated with the new version of the SDK.

…alizing

Also added a bunch of test coverage around boundary values.
@chaosrealm
Copy link
Copy Markdown

LGTM

@bitsforthought bitsforthought merged commit 9f9180b into Azure:search-3.0.3 Feb 23, 2017
@bitsforthought bitsforthought deleted the infinity-fix branch February 23, 2017 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants