Open Magnati opened 4 months 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
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.