18 lines
589 B
Python
18 lines
589 B
Python
from drf_spectacular.utils import extend_schema
|
|
from rest_framework.permissions import AllowAny
|
|
from rest_framework.response import Response
|
|
from rest_framework.views import APIView
|
|
|
|
|
|
class HealthCheckView(APIView):
|
|
authentication_classes = []
|
|
permission_classes = [AllowAny]
|
|
|
|
@extend_schema(
|
|
tags=["Health"],
|
|
summary="Health check",
|
|
description="Returns service availability status.",
|
|
responses={200: {"type": "object", "properties": {"status": {"type": "string"}}}},
|
|
)
|
|
def get(self, request):
|
|
return Response({"status": "ok"})
|