Closed awtkns closed 3 years ago
I haven't used Tortoise much before but I imagine it would be very similar to the way it is used with SQLAclchemy.
So something like this:
from fastapi_crudrouter import TortoiseCRUDRouter
ormModel = # ... Tortoise ORM model
pydanticOrmModel = # ... The pydantic model for the above tortoise model
router = TortoiseCRUDRouter(model=ormModel, schema=pydanticOrmModel)
Thoughts?
I like it. I'd work on this if there wasn't an incredibly tight timeline you'd be looking for it.
What does this look like in your eyes? I have a pipeline setup that auto generates schemas from tortoise ORM. Wouldn't you want to just use the schemas from that?