File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
openapi_core/contrib/django
tests/integration/contrib/django/data/v3.0/djangoproject/status Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 13
13
DjangoOpenAPIValidRequestHandler ,
14
14
)
15
15
from openapi_core .contrib .django .integrations import DjangoIntegration
16
+ from openapi_core .contrib .django .providers import get_default_openapi_instance
16
17
from openapi_core .contrib .django .requests import DjangoOpenAPIRequest
17
18
from openapi_core .contrib .django .responses import DjangoOpenAPIResponse
18
19
19
20
20
- class DjangoOpenAPIDecorator (DjangoIntegration ):
21
+ class DjangoOpenAPIViewDecorator (DjangoIntegration ):
21
22
valid_request_handler_cls = DjangoOpenAPIValidRequestHandler
22
23
errors_handler_cls : Type [DjangoOpenAPIErrorsHandler ] = (
23
24
DjangoOpenAPIErrorsHandler
@@ -50,7 +51,7 @@ def __call__(self, view_func):
50
51
Thanks to this method, the class acts as a decorator.
51
52
Example usage:
52
53
53
- @DjangoOpenAPIDecorator ()
54
+ @DjangoOpenAPIViewDecorator ()
54
55
def my_view(request): ...
55
56
56
57
"""
Original file line number Diff line number Diff line change 3
3
from django .http import HttpResponse
4
4
from jsonschema_path import SchemaPath
5
5
6
- from openapi_core .contrib .django .decorators import DjangoOpenAPIDecorator
6
+ from openapi_core .contrib .django .decorators import DjangoOpenAPIViewDecorator
7
7
8
- check_minimal_spec = DjangoOpenAPIDecorator .from_spec (
8
+ check_minimal_spec = DjangoOpenAPIViewDecorator .from_spec (
9
9
SchemaPath .from_file_path (
10
10
Path ("tests/integration/data/v3.0/minimal_with_servers.yaml" )
11
11
)
You can’t perform that action at this time.
0 commit comments