- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add frozenset to schema.py/field_class_to_schema #1557
Comments
Could you fix your formatting in the issue? It would be useful to see a demonstration of the problem: e.g. code that raises an exception. |
I have added my exception. |
I meant a self contained example that demonstrates the problem. E.g.: from pydantic import BaseModel
... |
This piece of code is ok. But when I read "SwaggerUI" in web framework "FastApi", the above exception occured. |
That's not a demonstration of the problem. The error can be caused with: from pydantic import BaseModel
class Item(BaseModel):
item1: frozenset
item = Item(item1={1, 2, 3})
print(item.schema()) exception:
This is what I was looking for. PR welcome to to fix this. |
Feature Request
The text was updated successfully, but these errors were encountered: