Skip to content

Commit d254bca

Browse files
Update includes in docs/en/docs/advanced/additional-responses.md
1 parent 44cfb2f commit d254bca

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

docs/en/docs/advanced/additional-responses.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ Each of those response `dict`s can have a key `model`, containing a Pydantic mod
2626

2727
For example, to declare another response with a status code `404` and a Pydantic model `Message`, you can write:
2828

29-
```Python hl_lines="18 22"
30-
{!../../docs_src/additional_responses/tutorial001.py!}
31-
```
29+
{* ../../docs_src/additional_responses/tutorial001.py hl[18,22] *}
3230

3331
/// note
3432

@@ -177,9 +175,7 @@ You can use this same `responses` parameter to add different media types for the
177175

178176
For example, you can add an additional media type of `image/png`, declaring that your *path operation* can return a JSON object (with media type `application/json`) or a PNG image:
179177

180-
```Python hl_lines="19-24 28"
181-
{!../../docs_src/additional_responses/tutorial002.py!}
182-
```
178+
{* ../../docs_src/additional_responses/tutorial002.py hl[19:24,28] *}
183179

184180
/// note
185181

@@ -207,9 +203,7 @@ For example, you can declare a response with a status code `404` that uses a Pyd
207203

208204
And a response with a status code `200` that uses your `response_model`, but includes a custom `example`:
209205

210-
```Python hl_lines="20-31"
211-
{!../../docs_src/additional_responses/tutorial003.py!}
212-
```
206+
{* ../../docs_src/additional_responses/tutorial003.py hl[20:31] *}
213207

214208
It will all be combined and included in your OpenAPI, and shown in the API docs:
215209

@@ -243,9 +237,7 @@ You can use that technique to reuse some predefined responses in your *path oper
243237

244238
For example:
245239

246-
```Python hl_lines="13-17 26"
247-
{!../../docs_src/additional_responses/tutorial004.py!}
248-
```
240+
{* ../../docs_src/additional_responses/tutorial004.py hl[13:17,26] *}
249241

250242
## More information about OpenAPI responses
251243

0 commit comments

Comments
 (0)