-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fastapi search improve model validation and add api contract tests #11549
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
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8a68790
move processing of 'fields' queryparam to pydantic
RayBB c5a7b22
remove mode, it's already default
RayBB 9ae433a
refactor: Move `q` parameter validation into `PublicQueryOptions` fie…
RayBB d1cb2da
feat: Add JSON parsing error handling for the `query` parameter in th…
RayBB df5c438
feat: Add JSON query parameter with validation to `WorkSearchScheme` …
RayBB 138405d
refactor: encapsulate sort and spellcheck_count query parameters with…
RayBB a4a7c17
refactor: Unify search endpoint parameters into a single `SearchReque…
RayBB 463211f
refactor: Exclude offset from the search query dictionary and add a t…
RayBB 6e973ea
feat: add description and examples to the search language parameter
RayBB 6616f18
feat: Add descriptions and examples to search query facet fields.
RayBB 1b2a6e1
move q back up
RayBB 5c5a18e
refactor: simplify `Field` default assignments and ensure sorted defa…
RayBB 2eb7533
refactor: replace HTTPException with ValueError in Pydantic field val…
RayBB 1b32833
docs: add "search" tag to `/search.json` endpoint
RayBB a8c54cb
feat: Use BeforeValidator to parse comma-separated fields string into…
RayBB dce8305
feat: Parse search query parameter as a JSON dictionary and refactor …
RayBB 745c782
test: replace query alias test with precedence test for search parame…
RayBB df7f55a
feat: introduce Pydantic SearchResponse model for `/search.json` endp…
RayBB 3181dbf
feat: Add API contract tests to compare FastAPI and webpy search endp…
RayBB 4ecb9de
feat: Remove explicit `page` and `limit` addition to search query dic…
RayBB 7f9d60e
feat: Standardize boolean query parameters to string literals, add `a…
RayBB 05ed95a
add all search fields programatically
RayBB d5e26a6
test: rename arbitrary query parameter `osp_count` to `osp_count_fake…
RayBB affc787
refactor: Remove dynamic field addition by inlining WorkSearchScheme …
RayBB b548926
feat: refactor work search query parameter handling.
RayBB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't bother since the unit tests powered by the examples will be deleted once the webpy endpoint is deleted, and the examples don't really need justification.