Skip to content

Commit c162dbd

Browse files
committed
moved doc_decorator and feature NinjaAPI constructor parameter to kwargs cause of backward compartibility
1 parent fbd3237 commit c162dbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ninja_extra/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from importlib import import_module
2-
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
2+
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Type, Union, Any
33

44
from django.core.exceptions import ImproperlyConfigured
55
from django.http import HttpRequest, HttpResponse
@@ -30,26 +30,26 @@ def __init__(
3030
description: str = "",
3131
openapi_url: Optional[str] = "/openapi.json",
3232
docs_url: Optional[str] = "/docs",
33-
docs_decorator: Optional[Callable[[TCallable], TCallable]] = None,
3433
urls_namespace: Optional[str] = None,
3534
csrf: bool = False,
3635
auth: Union[Sequence[Callable], Callable, NOT_SET_TYPE] = NOT_SET,
3736
renderer: Optional[BaseRenderer] = None,
3837
parser: Optional[Parser] = None,
3938
app_name: str = "ninja",
39+
**kwargs: Any
4040
) -> None:
4141
super(NinjaExtraAPI, self).__init__(
4242
title=title,
4343
version=version,
4444
description=description,
4545
openapi_url=openapi_url,
4646
docs_url=docs_url,
47-
docs_decorator=docs_decorator,
4847
urls_namespace=urls_namespace,
4948
csrf=csrf,
5049
auth=auth,
5150
renderer=renderer,
5251
parser=parser,
52+
**kwargs
5353
)
5454
self.app_name = app_name
5555
self.exception_handler(exceptions.APIException)(self.api_exception_handler)

0 commit comments

Comments
 (0)