Closed ccoors closed 1 week ago
Hi. Thank you for the bug report. I will look at this quickly.
This is fixed in 0.1.8.
Actually it is needed to use an union user = User[Union[EnterpriseUser, SuperHero]]
The User[EnterpriseUser, SuperHero]
syntax could be used starting with python 3.11 thanks to PEP646, but it seems there are missing pieces in pydantic at the moment.
In the tutorial it says that schema extensions can be added to Resources like this:
Unfortunately that doesn't work, neither with the provided models nor with custom models. I added this test case in
test_dynamic_resources.py
:And get this error message: