Skip to content

fix: remove duplicate key on code-samples #727

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

Merged
merged 1 commit into from
Mar 30, 2023
Merged

fix: remove duplicate key on code-samples #727

merged 1 commit into from
Mar 30, 2023

Conversation

justkahdri
Copy link

@justkahdri justkahdri commented Mar 29, 2023

Pull Request

Discovered debugging the following error:

Error: The sample file of Python SDK cannot be converted to JSON
Project: meilisearch-python
---
get_one_index_1: |-
  client.get_ind
        ------ ↓ ORIGINAL ERROR ↓ ------
        duplicated mapping key (543:1)

 540 |   client.index('books').search( ...
 541 |     'sort': ['rating.users:asc']
 542 |   })
 543 | search_parameter_guide_sort_1: |-
-------^
 544 |   client.index('books').search( ...
 545 |     'sort': ['price:asc']

What does this PR do?

  • Removes duplicate key on the .code-samples.meilisearch.yml.
    This avoids the sampleYamlToJs function failure when trying to parse the content to a JS object.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

fix: remove duplicate key on .code-samples.meilisearch.yml
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks for this PR @justkahdri ❤️

@alallema
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 30, 2023

@bors bors bot merged commit 9e5e00d into meilisearch:main Mar 30, 2023
@justkahdri justkahdri deleted the patch-1 branch March 30, 2023 19:14
@bidoubiwa bidoubiwa added the bug Something isn't working label Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants