Handle empty query parameters attempts: Attempted to fix query parameter handling, see #2.#4
Open
Adebowale-Morakinyo wants to merge 4 commits into
Open
Conversation
…tQuerySchema to specify the missing parameter for the fields that have default values.
…tQuerySchema setting required=False to ensure that missing query parameters won't result in validation errors, allowing the NoteList get method to handle them with default logic
… how the query parameters are being loaded, whether validation errors are occurring, and if the default values are being applied correctly.
…lse in the decorator should skip the validation step for the fields extracted from the query parameters, to allow handling validation manually in the endpoint, see #2
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request contains attempts made to resolve issue #2.
Problem: The issue was related to handling empty query parameters in the NoteList endpoint, which caused a "Not a valid integer" error.
Attempts: In this branch, we made several attempts to address the issue. These attempts include:
NoteListQuerySchemato use default values when query parameters are missing.NoteListendpoint to handle empty query parameters and provide meaningful default values.Testing: We conducted tests for each attempt to determine their effectiveness in resolving the issue. However, none of these attempts provided a complete solution.
Related Changes:
NoteListQuerySchemaandNoteListendpoint to test different approaches.While these attempts did not fully resolve the issue, they are part of our process to identify the most effective solution. We have learned from these attempts and have since implemented a working solution in the "handle-empty-query-parameters" branch.
Please review these attempts for reference and historical context. However, the working solution is available in the "handle-empty-query-parameters" branch, and we recommend merging that branch to address the issue.
Thank you for your understanding.