Skip to content

Commit f752c49

Browse files
committed
doc: attribute exclusion improvement
1 parent e0c920f commit f752c49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/tutorial.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,11 @@ This is useful for server implementations, so custom models or models provided b
360360
To disable an attribute in a custom resource subclass, annotate it with type ``None``:
361361

362362
.. code-block:: python
363+
:caption: Disabling a field inherited from a parent resource
363364
364365
>>> class CustomUser(User):
365366
... # This attribute will be excluded from schema generation
366-
... foobar: None = None
367+
... display_name: None = None
367368
368369
Dynamic models from schemas
369370
===========================

0 commit comments

Comments
 (0)