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

Bug fix: FastAPI response in Meilisearch #33

Merged
merged 1 commit into from
Jul 15, 2023
Merged

Bug fix: FastAPI response in Meilisearch #33

merged 1 commit into from
Jul 15, 2023

Conversation

prrao87
Copy link
Owner

@prrao87 prrao87 commented Jul 15, 2023

FastAPI bug fix for Meilisearch

  • Fields like id, price and points weren't marked in the displayed attributes
  • As a result, queries to the endpoints were returning incomplete results that failed Pydantic validation
  • All fields marked as "displayed" attributes in the Meilisearch JSON schema need to be in the Pydantic schema, and vice versa
  • Tests should cover this pretty effectively, but it's important to know how to structure the Meilisearch schema in line with the FastAPI models that validate responses from user queries

- Fields like id, price and points weren't marked in the displayed attributes
- As a result, queries to the endpoints were returning incomplete results that failed Pydantic validation
- All fields marked as "displayed" attributes in the Meilisearch JSON schema need to be in the Pydantic schema, and vice versa
@prrao87 prrao87 merged commit 890ca43 into main Jul 15, 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.

1 participant