Vitaliy Kucheryaviy
Vitaliy Kucheryaviy
Hi @fabiocaccamo can you show some code where this can be reproduced ?
Hi @mister-rao Good question... what is your schema expectation for GenericForeignKey ?
Hi @baidoosik I think this decorator works on the view level.. try this (in django ninja 1.x): ```Python from ninja.decorators import decorate_view @api.post("/foo/bar") @decorate_view(non_atomic_requests) async def foo_bar(request): pass ```
@blohinn Unfortunately overriding response descriptions currently not possible.. I think the best approach would be to add extra parameter: ```Python @api.get('/some', response={200: Schema1, 404: Schema2}, response_description={200: 'OK', 404: 'Task not...
@flaeppe not sure.. seems some extra thing that cognitively hard to keep in mind for users... for now this is how it looks like people mainly add descriptions : ```Python...
maybe the best way would be to use some thing from schema (like docstring or some extra parameter) that will automatically be copied to openapi descriptions... which seems the most...
maybe something like [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated) actually can look better here: ```Python @api.get("...", response={ 200: Annotated[Schema1, "Super successful"], 404: Annotated[Schema2, "Task not found"], } ): def endpoint(...) -> ...: ``` which can...
or even tuples ```Python @api.get("...", response={ 200: (Schema1, "Super successful"), 404: (Schema2, "Task not found"), } ): def endpoint(...) -> ...: ```
@greathector7 hard to tell - you might need to give more details
@greathector7 could you show some code ? how you initialized NinjaAPI, how you included it to urls ?