Vitaliy Kucheryaviy
Vitaliy Kucheryaviy
Hi @OtherBarry I think it some general issue with `Optional` marking - for you now you can skip it by passing `[]` empty list as default value: ```Python @router.get("/test") def...
@Andrioden try change `: Optional[int] = None` to `: int = None` (Remove the optional - I think generally Optional is currently have some bug)
well you define your response as a list: ```Python response=List[CopywritingListSchemaOut] ``` so list is expected if you need to that structure you need to define your response schema apropriately: ```Python...
@ddzyx ```Python qs = list(qs) #
Hi @esc5221 would be able to add test cases that covers the issue you described ?
@migratis well it looks like you are using some library on top of django ninnja - so I'm not 100% sure what's going on but most likely .dict() does not...
@flaeppe the router decorator must be the very top one (as it does the final operation preparation and registration) ```Python @api.get("/hello") @ensure_csrf_cookie def foo(request.... ```
Hi @tykling Under the hood django-ninja uses pydantic - so you can use the `.dict()` method ([link](https://pydantic-docs.helpmanual.io/usage/exporting_models/#modeldict)) with `exclude_unset` argument: ```Python @api.get('/foo') def foo(request, test: TestShema): data = test.dict(exclude_unset=True) #...
@scheung38 well you can take any library that already integrated with django (like [elastic-search-dsl](https://django-elasticsearch-dsl.readthedocs.io/en/latest/index.html) or [haystack](https://django-haystack.readthedocs.io/en/master/) ) and just use it - usually they return dict-like responses (or querysets )...
> This works: > async def test(query: List[int] = Query(...)) -> List[int]: > All the best :) Yes, it works, but my guess is - either FastAPI should raise some...