Vitaliy Kucheryaviy

Results 283 comments of Vitaliy Kucheryaviy

Hi @Ismael you can achieve it with **openapi_extra**: ```Python api = NinjaAPI( openapi_extra={ # < ------ 'tags': [ { 'name': 'tag1', 'description': 'Some description goes here', } ] } )...

@wachpwnski try: ```Python class AuthorSchema(Schema): ... books: List[BookSchema] = Field([], alias="books") ```

Still thinking about it (need more testing on like how it will behave wit schema have resolvers or handles objects outputs instead of dicts...)

@tushar9sk so what structure you have in mind ?

Well schema's tend to describe/document everything that can be passed to it.. maybe it makes more sense to put it to schema as optional field: ```Python class UserSchema(Schema): username: str...

well my second example should do it

Hi @unique1o1 could you define "doesn't work" - does it give some error ? or behaves differently (how) ?

Hi @LevonW-IIS currently you can do it like this: ```Python BIN_RESPONSE = { "responses": { 200: { "description": "OK", "content": {"application/octet-stream": {"schema": {"type": "string", "format": "binary"}}}, } } } @api.get("/hello",...

Hi @Zerotask I"m not sure about this part ``` @api.api_operation([HTTPMethod.POST, HTTPMethod.PATCH], "/path") ``` this makes it longer, and it is not really a place which people use often or make...

Hi @MM-cyi You can create a custom docs viewer and override default template: https://github.com/vitalik/django-ninja/blob/master/ninja/templates/ninja/swagger_cdn.html you can render it like this: ```Python from ninja.openapi.docs import Swagger class MyDocs(Swagger): template = 'path/to/my/template.html'...