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 1313 DjangoOpenAPIValidRequestHandler ,
1414)
1515from openapi_core .contrib .django .integrations import DjangoIntegration
16+ from openapi_core .contrib .django .providers import get_default_openapi_instance
1617from openapi_core .contrib .django .requests import DjangoOpenAPIRequest
1718from openapi_core .contrib .django .responses import DjangoOpenAPIResponse
1819
1920
20- class DjangoOpenAPIDecorator (DjangoIntegration ):
21+ class DjangoOpenAPIViewDecorator (DjangoIntegration ):
2122 valid_request_handler_cls = DjangoOpenAPIValidRequestHandler
2223 errors_handler_cls : Type [DjangoOpenAPIErrorsHandler ] = (
2324 DjangoOpenAPIErrorsHandler
@@ -50,7 +51,7 @@ def __call__(self, view_func):
5051 Thanks to this method, the class acts as a decorator.
5152 Example usage:
5253
53- @DjangoOpenAPIDecorator ()
54+ @DjangoOpenAPIViewDecorator ()
5455 def my_view(request): ...
5556
5657 """
Original file line number Diff line number Diff line change 33from django .http import HttpResponse
44from jsonschema_path import SchemaPath
55
6- from openapi_core .contrib .django .decorators import DjangoOpenAPIDecorator
6+ from openapi_core .contrib .django .decorators import DjangoOpenAPIViewDecorator
77
8- check_minimal_spec = DjangoOpenAPIDecorator .from_spec (
8+ check_minimal_spec = DjangoOpenAPIViewDecorator .from_spec (
99 SchemaPath .from_file_path (
1010 Path ("tests/integration/data/v3.0/minimal_with_servers.yaml" )
1111 )
You can’t perform that action at this time.
0 commit comments