]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update release notes
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 18 Mar 2023 19:24:12 +0000 (20:24 +0100)
committerSebastián Ramírez <tiangolo@gmail.com>
Sat, 18 Mar 2023 19:24:12 +0000 (20:24 +0100)
docs/en/docs/release-notes.md

index b413d60fef4563b958a1a8967e1d0ddd54e83f5d..3a196623af21b631e2d75821e81a66f08b231e8b 100644 (file)
@@ -2,10 +2,10 @@
 
 ## Latest Changes
 
-* 📝 Tweak tip recommending `Annotated` in docs. PR [#9270](https://github.com/tiangolo/fastapi/pull/9270) by [@tiangolo](https://github.com/tiangolo).
+
 ### Highlights
 
-This release adds support for dependencies and parameters using `Annotated`. ✨
+This release adds support for dependencies and parameters using `Annotated` and recommends its usage. ✨
 
 This has **several benefits**, one of the main ones is that now the parameters of your functions with `Annotated` would **not be affected** at all.
 
@@ -85,6 +85,19 @@ def delete_item(user: CurrentUser, item_id: int):
 
 ...and `CurrentUser` has all the typing information as `User`, so your editor will work as expected (autocompletion and everything), and **FastAPI** will be able to understand the dependency defined in `Annotated`. 😎
 
+Roughly **all the docs** have been rewritten to use `Annotated` as the main way to declare **parameters** and **dependencies**. All the **examples** in the docs now include a version with `Annotated` and a version without it, for each of the specific Python version (when there are small differences/improvements in more recent versions).
+
+The key updated docs are:
+
+* Python Types Intro:
+    * [Type Hints with Metadata Annotations](https://fastapi.tiangolo.com/python-types/#type-hints-with-metadata-annotations).
+* Tutorial:
+    * [Query Parameters and String Validations - Additional validation](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#additional-validation)
+        * [Advantages of `Annotated`](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#advantages-of-annotated)
+    * [Path Parameters and Numeric Validations - Order the parameters as you need, tricks](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#order-the-parameters-as-you-need-tricks)
+        * [Better with `Annotated`](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#better-with-annotated)
+    * [Dependencies - First Steps - Share `Annotated` dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/#share-annotated-dependencies)
+
 Special thanks to [@nzig](https://github.com/nzig) for the core implementation and to [@adriangb](https://github.com/adriangb) for the inspiration and idea with [Xpresso](https://github.com/adriangb/xpresso)! 🚀
 
 ### Features
@@ -93,6 +106,7 @@ Special thanks to [@nzig](https://github.com/nzig) for the core implementation a
 
 ### Docs
 
+* 📝 Tweak tip recommending `Annotated` in docs. PR [#9270](https://github.com/tiangolo/fastapi/pull/9270) by [@tiangolo](https://github.com/tiangolo).
 * 📝 Update order of examples, latest Python version first, and simplify version tab names. PR [#9269](https://github.com/tiangolo/fastapi/pull/9269) by [@tiangolo](https://github.com/tiangolo).
 * 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests. PR [#9268](https://github.com/tiangolo/fastapi/pull/9268) by [@tiangolo](https://github.com/tiangolo).