swagger в tests

This commit is contained in:
Cja committed 2025-02-03 17:12:41 +03:00
1 parent dfa9c7a112
commit 2a5f021d1f
2 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ from .views import *
urlpatterns = [
path('testdetail/<int:id>/', TestDetail.as_view(),name='TestDetail'),
path('gettests/', GetTests.as_view(), name="GetTests"),
path('gettesting/', GetTesting.as_view(), name="GetTesting"),
# path('gettesting/', GetTesting.as_view(), name="GetTesting"),
path('testresultview/', TestResultView.as_view(), name="TestResultView"),
]
+6 -6
View File
@@ -40,8 +40,8 @@ class GetTests(generics.ListAPIView):
),
],
responses={
200: openapi.Response('Успех', TestsSerializer(many=True)),
400: 'Неверный запрос',
200: "success",
400: 'error',
}
)
def get (self, request, *args, **kwargs):
@@ -127,8 +127,8 @@ class TestResultView(generics.ListCreateAPIView):
),
],
responses={
200: openapi.Response('Успех', TestsSerializer(many=True)),
400: 'Неверный запрос',
200: "success",
400: 'error',
}
)
def get(self, request, *args, **kwargs):
@@ -162,8 +162,8 @@ class TestResultView(generics.ListCreateAPIView):
),
),
responses={
200: openapi.Response('Успех', TestsSerializer(many=True)),
400: 'Неверный запрос',
200: "success",
400: 'error',
}
)
def post(self, request, *args, **kwargs):