Replies: 1 comment
-
|
Agree that it's a bit confusing in the docs. Current version:
My suggestion (slightly modified version of @anilsg):
|
Beta Was this translation helpful? Give feedback.
-
|
Agree that it's a bit confusing in the docs. Current version:
My suggestion (slightly modified version of @anilsg):
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
docs: clarify partial update exclude_unset label:docs label:problem
The "Using Pydantic's exclude_unset parameter" section under "Partial updates with PATCH" on the "Body - Updates" page had me confused for a while: https://fastapi.tiangolo.com/tutorial/body-updates/?h=partial#using-pydantics-exclude_unset-parameter
The language says "that would generate a dict" and "then you can use this ...
The "that/then/this" implies two steps, and the reference to "this" grammatically applies to the dict that has already been generated, and so actually implies you will be generating another dict from the first dict.
This was so bizarre that I dropped it for a while but now that I've solved my problem I can see the docs are misleading here.
Call me close-minded because I'm so pedantic (hah hah) but I think many devs are like me that basically I was trusting the accuracy so much that when it was slightly wrong my brain didn't let in any alternative interpretations. And anyway, the implication of the text is actually strictly wrong.
So I do have a (somewhat more verbose) correction for this, that I have applied to a clone I pulled, and can provide a little pull request to correct it. This will also help me get the hang of tiangolo GitHub PRs, which will potentially help down the track since I may have an authorization scheme for a particular bastard Azure approach that I can submit.
This is the proposed correction. On receiving approval I will submit a PR once I've figured out that process with respect to creating branches on CLI and clicking the "new PR" button on GitHub...
Operating System
Linux, Windows
Operating System Details
Unfortunately currently forced to develop on Windows but deploy to Ubuntu Linux. Hopefully we'll fix this soon.
FastAPI Version
0.88.0
Python Version
3.9.13
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions