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 = [
|
urlpatterns = [
|
||||||
path('testdetail/<int:id>/', TestDetail.as_view(),name='TestDetail'),
|
path('testdetail/<int:id>/', TestDetail.as_view(),name='TestDetail'),
|
||||||
path('gettests/', GetTests.as_view(), name="GetTests"),
|
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"),
|
path('testresultview/', TestResultView.as_view(), name="TestResultView"),
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -40,8 +40,8 @@ class GetTests(generics.ListAPIView):
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
responses={
|
responses={
|
||||||
200: openapi.Response('Успех', TestsSerializer(many=True)),
|
200: "success",
|
||||||
400: 'Неверный запрос',
|
400: 'error',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
def get (self, request, *args, **kwargs):
|
def get (self, request, *args, **kwargs):
|
||||||
@@ -127,8 +127,8 @@ class TestResultView(generics.ListCreateAPIView):
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
responses={
|
responses={
|
||||||
200: openapi.Response('Успех', TestsSerializer(many=True)),
|
200: "success",
|
||||||
400: 'Неверный запрос',
|
400: 'error',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
@@ -162,8 +162,8 @@ class TestResultView(generics.ListCreateAPIView):
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
responses={
|
responses={
|
||||||
200: openapi.Response('Успех', TestsSerializer(many=True)),
|
200: "success",
|
||||||
400: 'Неверный запрос',
|
400: 'error',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
|
|||||||
Reference in new issue
Block a user