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.
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
[Issue #3448] Create API endpoint for POST /users/:userID/save-searches #3472
base: main
Are you sure you want to change the base?
[Issue #3448] Create API endpoint for POST /users/:userID/save-searches #3472
Changes from 2 commits
e21a736
71cde06
27613ef
499dc5d
54f007f
4c82206
23e428e
c97fc30
50c900a
14c9e46
2887afc
2620530
f56a1d5
a6a92fd
0fdf13c
e144b68
4ba5696
c16acf7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Could we have this be the actual schema we use in the search endpoint? Just to make sure it's valid.
Also want to make sure the JSON serialization works with a full search request object for things like enums and dates.
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.
I added something to the test using
get_search_request()
. Something like this you have in mind?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.
I was thinking we would do
search_query = fields.Nested(OpportunitySearchRequestV1Schema)
- that way we can only take in a schema that is valid for search. Anything that isn't a valid search request should be rejected (eg. a user couldn't just pass{"some_field": "whatever"}
.)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.
I checked in the changes. This makes me wonder if we should also store the version of the search request schema for validation later. If, for example, we want the response to correspond to the schema that was inputted. It would be able to handle schema changes (and we could just output a
dict
response type validated against the stored schema version in a new db column. Otherwise we would not be able to validate response schema if this OpportunitySearchRequestV1Schema changes.