lexiq-legal / pydantic_schemaorg

Schema.org classes in pydantic
MIT License
56 stars 15 forks source link

`.schema()` fails #10

Open auxsvr opened 1 year ago

auxsvr commented 1 year ago

Probably because of the solution to #4, calling .schema() with most models fails with error message:

TypeError: issubclass() arg 1 must be a class

The solution seems to be to load all the models, then call .update_forward_refs() for each, which takes a lot of time and memory.

This is with Python 3.10, pydantic 1.10.4, pydantic-schemaorg 1.0.6.