Open Magnati opened 1 month ago
Hi @Magnati, this is an issue of Pymongo ObjectId. The ObjectId is not JSON serializeable. If we convert it to string type then the issue will be solved but we will lose all of the features of the ObjectId, which we don't want to.
Not only the API documentation but also the respective API will through an error that the object is not JSON serializable.
Hey,
it seems your Document class kills the ability of Fastapi to use Pydantic models directly to check the output schema of an endpoint. At least it leads to an error during the creation of the openapi.json. Resulting in an error when checking![Bildschirmfoto 2024-07-05 um 14 33 42](https://github.com/nayan32biswas/mongodb-odm/assets/9417155/a71493e5-d438-4cf1-874e-07a0ae28b500)
0.0.0.0:4567/docs
for the swagger UI:Is this a known issue or a false usage error on my site? Minimal reproducable.