I have a GET request that accepts parameters that were defined as class dependencies like in the FastAPI Docs.
I already had a problem including a list of strings as a property of the dependency class, but I solved it.
However now I want a list of objects to be a property of the dependency class, but it seems that FastAPI cannot handle list of complex objects in such a situation.
Does anybody have an idea on how I can define something like the following and not having FastAPI about handling list of complex objects in GET requests?
This is an example that fails:
class Foo(BaseModel):
some_property:int
list_of_objects:list(some_obj)
@app.get("/items/")
async def read_items(commons: Annotated[Foo, Depends()]):
...