mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-22 01:45:21 -04:00
📝 Update docs highlighting after re-sort imports
coming back to flit, after pipenv
This commit is contained in:
1 parent
7da9625505
commit
e6ca71523b
10 files changed
+54
-54
No files matched your search
@@ -11,7 +11,7 @@ You can pass directly the `int` code, like `404`.
|
||||
|
||||
But if you don't remember what each number code is for, you can use the shortcut constants from `starlette`:
|
||||
|
||||
```Python hl_lines="4 19"
|
||||
```Python hl_lines="5 18"
|
||||
{!./tutorial/src/path_operation_configuration/tutorial001.py!}
|
||||
```
|
||||
|
||||
@@ -22,7 +22,7 @@ That status code will be used in the response and will be added to the OpenAPI s
|
||||
|
||||
You can add tags to your path operation, pass the parameter `tags` with a `list` of `str` (commonly just one `str`):
|
||||
|
||||
```Python hl_lines="18 23 28"
|
||||
```Python hl_lines="17 22 27"
|
||||
{!./tutorial/src/path_operation_configuration/tutorial002.py!}
|
||||
```
|
||||
|
||||
@@ -34,7 +34,7 @@ They will be added to the OpenAPI schema and used by the automatic documentation
|
||||
|
||||
You can add a `summary` and `description`:
|
||||
|
||||
```Python hl_lines="21 22"
|
||||
```Python hl_lines="20 21"
|
||||
{!./tutorial/src/path_operation_configuration/tutorial003.py!}
|
||||
```
|
||||
|
||||
@@ -42,7 +42,7 @@ You can add a `summary` and `description`:
|
||||
|
||||
As descriptions tend to be long and cover multiple lines, you can declare the path operation description in the function <abbr title="a multi-line string as the first expression inside a function (not assigned to any variable) used for documentation">docstring</abbr> and **FastAPI** will read it from there.
|
||||
|
||||
```Python hl_lines="20 21 22 23 24 25 26 27 28"
|
||||
```Python hl_lines="19 20 21 22 23 24 25 26 27"
|
||||
{!./tutorial/src/path_operation_configuration/tutorial004.py!}
|
||||
```
|
||||
|
||||
@@ -57,7 +57,7 @@ It will be used in the interactive docs:
|
||||
|
||||
You can specify the response description with the parameter `response_description`:
|
||||
|
||||
```Python hl_lines="22"
|
||||
```Python hl_lines="21"
|
||||
{!./tutorial/src/path_operation_configuration/tutorial005.py!}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user