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

scope deepObject defaults code to query params only #1110

Merged
merged 2 commits into from
Jan 20, 2020

Conversation

dtkav
Copy link
Collaborator

@dtkav dtkav commented Dec 19, 2019

Fixes spread of defaults into other parameters

Redo #971
Fixes #1092
Fixes #1082

Changes proposed in this pull request:

  • scope deepObject code to openapi3-only code blocks (defaults do not belong in uri_parsing, nor does deepObject logic make sense in an AbstractURIParser)
  • fix set_default_values(...) which put defaults from any parameter type into all other parameters.

Future:

  • modify testing fixtures to catch setting request.form, request.files, request.body etc unintentionally

@dtkav dtkav changed the title WIP: scope deepObject defaults code to query params only scope deepObject defaults code to query params only Dec 19, 2019
@dtkav
Copy link
Collaborator Author

dtkav commented Jan 15, 2020

blocked by #1125

@dtkav dtkav added the bugfix label Jan 15, 2020
@dtkav
Copy link
Collaborator Author

dtkav commented Jan 15, 2020

@hjacobs this is a pretty nasty bug in the latest release. It would be great if you can have a look (after #1125)

@coveralls
Copy link

coveralls commented Jan 15, 2020

Coverage Status

Coverage increased (+0.0002%) to 96.284% when pulling 8954948 on dtkav:fix_deep_objects into 77f2861 on zalando:master.

@hjacobs
Copy link
Contributor

hjacobs commented Jan 16, 2020

Do we have some test to catch this bug, apparently not? Can you add one?

@dtkav
Copy link
Collaborator Author

dtkav commented Jan 19, 2020

@hjacobs I made the default param test use strict_app which catches the bug on master.

@hjacobs
Copy link
Contributor

hjacobs commented Jan 20, 2020

👍

@hjacobs hjacobs merged commit 1abab06 into spec-first:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants