Skip to content

Commit

Permalink
Improve Generic documentation about default type_name (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo authored Nov 17, 2021
1 parent cd0dbcc commit 48a8ff3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/data_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ They correpond to JSON *object* and are serialized to `dict`.
{!generic.py!}
```

!!! warning
Generic types don't have default *type name* (used in JSON/GraphQL schema) — should `Group[Foo]` be named `GroupFoo`/`FooGroup`/something else? — so they require by-class or default [`type_name` assignment](json_schema.md#set-reference-name).

## Recursive types, string annotations and PEP 563

Recursive classes can be typed as they usually do, with or without [PEP 563](https://www.python.org/dev/peps/pep-0563/).
Expand Down

0 comments on commit 48a8ff3

Please sign in to comment.