Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.7k
Only use default parameter values for path parameters (#450)#464
Only use default parameter values for path parameters (#450)#464tiangolo merged 17 commits intofastapi:masterfrom
Conversation
jonathanunderwood commentedAug 25, 2019
WIP: this approach is too aggressive as it ignores all |
Codecov Report
@@ Coverage Diff @@## master #464 +/- ##==========================================- Coverage 100% 99.98% -0.02%========================================== Files 242 243 +1 Lines 5677 5746 +69 ==========================================+ Hits 5677 5745 +68- Misses 0 1 +1
Continue to review full report at Codecov.
|
codecovbot commentedAug 26, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #464 +/- ##====================================== Coverage 100% 100% ====================================== Files 253 243 -10 Lines 6149 5749 -400 ======================================- Hits 6149 5749 -400
Continue to review full report at Codecov.
|
9780900 to14429a2Comparejonathanunderwood commentedAug 26, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As far as I can see this should be mergeable. The travis runs are raising errors with incorrectly sorted imports in masses of other files unrelated to this commit, so I'm not sure what's going on there.@tiangolo please advise. |
14429a2 tod4f9097Compareeuri10 commentedAug 26, 2019 via email
Install locally with flit as described in the docLe lun. 26 août 2019 à 9:13 AM, jonathanunderwood <notifications@github.com>a écrit : … As far as I can see this should be mergeable. The travis runs are raising errors with incorrectly sorted imports in masses of other files unrelated to this commit, so I'm not sure what's going on there. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#464>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAINSPUAYBDIVXS5M2Z4QFLQGN7BNANCNFSM4IPI77SQ> . |
jonathanunderwood commentedAug 26, 2019
OK, fixed the import order issue. All should be good now. |
euri10 commentedAug 26, 2019
been bitten by it before too ;)#38 (comment) |
jonathanunderwood commentedSep 6, 2019
@tiangolo any feedback on this one? |
tiangolo left a comment
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.
Good job! Thanks for your contribution! 🚀 🍰 👏
I hadn't thought about this use case but I see how it could be useful in those cases.
LGTM in general 🎉
Just a couple of nitpick formatting requests, I inlined them all, so you just have to "accept" them. Sorry for the many suggestions, GitHub doesn't let me do multiline suggestions 😬
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
tiangolo commentedSep 29, 2019
jonathanunderwood commentedSep 29, 2019
All suggested formatting changes have been added. |
jonathanunderwood commentedSep 29, 2019
MyPy tests are now failing in code unrelated to this change, which is strange. |
This change allows endpoint functions to be defined with parameterswith defaults, but for those defaults to be ignored if the functionparameter subsequently appears as a path parameter. The defaultvalue is only operative if the parameter is a query parameter.This change includes a new set of tests for this functionality.
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
Co-Authored-By: Sebastián Ramírez <tiangolo@gmail.com>
1980d1d to864c6aeComparetiangolo commentedSep 29, 2019
Thanks for the format changes! Yeah, the same |
tiangolo left a comment
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.
LGTM! 🎉 🍰
tiangolo commentedSep 29, 2019
Thanks for your contribution@jonathanunderwood ! 🍰 🎉 🚀 |
jonathanunderwood commentedSep 30, 2019
Thanks for taking the time to review this change, much appreciated. |
This change allows endpoint functions to be defined with parameters with defaults, but for those defaults to be ignored if the function parameter subsequently appears as a path parameter. The default value is only operative if the parameter is a query parameter.
This change includes a new set of tests for this functionality.