swagger в tests
This commit is contained in:
1 parent
dfa9c7a112
commit
2a5f021d1f
2 files changed
+7
-7
No files matched your search
@@ -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"),
|
||||
]
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user