Merged
Conversation
d084df1 to
23cc3e4
Compare
Codecov Report
@@ Coverage Diff @@
## master #379 +/- ##
==========================================
- Coverage 93.16% 93.08% -0.09%
==========================================
Files 94 94
Lines 2311 2327 +16
Branches 286 291 +5
==========================================
+ Hits 2153 2166 +13
- Misses 123 124 +1
- Partials 35 37 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
23cc3e4 to
cc42e15
Compare
p1c2u
approved these changes
Sep 23, 2022
Collaborator
p1c2u
left a comment
There was a problem hiding this comment.
We can add this as experimental support.
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.
Problem statement
Currently deepObjects are not supported, this PR adds that support.
Description
Example spec
Sadly it doesn't really fit in the
ParameterDeserializersFactoryideology as it would never reach that step asget_value()in parameters.py would always fail as it tries to find thenameof theparam_or_headerin the specific location. This is because how a deepObjects query param looks like (e.g.someurl.com/?paramObj[count]=1¶mObj[name]=John), the function would try to findparamObjin the location, which it would not find as the QueryParams will be split into a dict like this:{'paramObj[count]': 1, 'paramObj[name]': John}.In my proposed solution it would split the location dict key into 2 parts, the actual key we want to find
paramObjand then create a dict of the 2nd part of the key (whats inside the brackets) with its actual value:{'count': 1, 'name': 'John'}.Afterwards this dict is checked via the schema of the object.
I highly doubt this solution will get accepted, so if you know a way to make this cleaner/better please lmk 🙏
Todos
Related issue