Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move preference to query params #816

Merged
merged 3 commits into from
Sep 22, 2021

Conversation

afg419
Copy link
Contributor

@afg419 afg419 commented Sep 17, 2021

This PR moves the preference parameter from the query body to the url as a query parameter. This is in accord with elasticsearch 7 specification.

Current behavior:

PostIndex.preference(:_local).wrappers
#=> Elasticsearch::Transport::Transport::Errors::BadRequest ([400] {"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a VALUE_STRING in [preference].","line":1,"col":15}],"type":"parsing_exception","reason":"Unknown key for a VALUE_STRING in [preference].","line":1,"col":15},"status":400})

New behavior post PR:

PostIndex.preference(:_local).wrappers
#=> stuff

Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the changelog if the new code introduces user-observable changes. See changelog entry format for details.

@rabotyaga
Copy link
Contributor

Hey @afg419 👋 !
Thanks for the contribution!
Do you mind adding a CHANGELOG line?

@afg419
Copy link
Contributor Author

afg419 commented Sep 20, 2021

Hey @afg419 👋 !
Thanks for the contribution!
Do you mind adding a CHANGELOG line?

Have done! And thanks for the review.

CHANGELOG.md Outdated Show resolved Hide resolved
@afg419 afg419 force-pushed the move_preference_to_query_params branch 2 times, most recently from db2a8a0 to 99d6614 Compare September 20, 2021 16:37
@afg419 afg419 force-pushed the move_preference_to_query_params branch from 99d6614 to 96efd2c Compare September 20, 2021 16:37
@rabotyaga rabotyaga merged commit dfcd4b0 into toptal:master Sep 22, 2021
rabotyaga pushed a commit that referenced this pull request Sep 22, 2021
cyucelen pushed a commit to cyucelen/chewy that referenced this pull request Jan 28, 2023
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.

2 participants